4 Sep 2012 13:02
how to convert message type into string
Hello
I'm new to the Yesod. I read few tutorials. Most tutorials used messages through hamlet code.For example, this code from Yesod book http://www.yesodweb.com/book/internationalization
getRootR :: Handler RepHtml
getRootR = defaultLayout [whamlet|
<h1>_{MsgHello}
<form action= <at> {BuyR}>
_{MsgEnterItemCount}
<input type=text name=count>
<input type=submit value=_{MsgPurchase}>
<form action= <at> {LangR} method=post>
_{MsgSwitchLanguage}
<select name=lang>
<option value=en>English
<option value=he>Hebrew
<input type=submit value=_{MsgSwitch}>
|]
but I want to be able to use them without putting them in a hamlet code. is there a way to convert them into String or Text.
RSS Feed