i18n messages in the scaffolding - yesodweb/yesod GitHub Wiki
The scaffolding used to include a messages folder for i18n messages. However, since this is a commonly unused feature, it was removed. To add back this feature, do the following:
- In
Foundation.hs, add the linemkMessage "App" "messages" "en". Replace "en" with your default language. - Create a directory "messages".
- Create a file "messages/en.msg" with the following dummy content:
Hello: Hello.
Then it will be possible to refer to the message in Hamlet templates with _{MsgHello}.
You can find comprehensive overview of messages in "Internationalization" article on Yesod web site.