[web-devel] Happstack internationalization and localization

Michael Snoyman michael at snoyman.com
Mon Dec 12 09:01:23 CET 2011

On Sat, Dec 10, 2011 at 9:56 PM, Michael Snoyman <michael at snoyman.com> wrote:
> On Sat, Dec 10, 2011 at 8:31 PM, Jeremy Shaw <jeremy at n-heptane.com> wrote:
>> On Sat, Dec 10, 2011 at 4:18 AM, Greg Weber <greg at gregweber.info> wrote:
>>> Yesod guesses the user's locale from the request headers and allows it to be
>>> overridden - this could easily be ported to Happstack.
>> Right. That sounds useful and easy to do.
>>> Yesod also directly
>>> supports putting i18n into Hamlet templates, which I think can also be done
>>> in Happstack. Yesod also provides a translator friendly veneer over Haskell
>>> data types- I think this could also be ported to different settings like
>>> Happstack.
>> We already have Hamlet support in Happstack. But, it seems like that
>> is not enough? We also need some stuff that is in Yesod.Message, etc?
>> In my ignorance, it seems like there are three pieces:
>>  1. a little bit of framework/application specific code that
>> detects/sets the language to use
>>  2. a bunch of framework independent code that deals with mapping
>> data-types to translated strings
>>  3. some glue code that makes it easy to use #2 with a particular
>> templating library
>> But, right now it seems that #2 is wrapped up in the yesod hierarchy
>> even though it would be useful for any Haskell program that wants
>> i18n? Or am I missing something?
> Looks like you hit everything. You're correct, (2) is currently
> included in the yesod-core package, but could easily be moved out to a
> common, shared package. Any ideas on package/module name?
> Michael

OK, it's a Shakespeare-like system, and it's for translations.

Any objections to titus (and Text.Titus)?


More information about the web-devel mailing list