[web-devel] Happstack internationalization and localization
jeremy at n-heptane.com
Sat Dec 10 19:31:56 CET 2011
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
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
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?
> On Fri, Dec 9, 2011 at 11:17 PM, Jeremy Shaw <jeremy at n-heptane.com> wrote:
>> Happstack does not offer anything special for internationalization.
>> And, it probably shouldn't either. I18N is a more general problem, and
>> it seems like a more general solution is what you want.
>> That said, to the best of my knowledge, I18N and L10N are not a very
>> well explored areas of Haskell development.
>> This page suggestions some methods:
>> What template system are you trying to use?
>> Also, if you have suggestions for how Happstack could make I18N
>> easier -- we'd be happy to hear them. But it seems like the problem is
>> largely orthogonal to Happstack itself?
>> One area where Happstack could be involved is if you wished to use
>> text encodings than UTF-8. That is mostly possible with Happstack
>> already. But you would need a pretty compelling reason to not just
>> stick with UTF-8 I think. (For example, interoperating with a legacy
>> system that does not use UTF-8).
>> - jeremy
>> On Fri, Dec 9, 2011 at 6:20 PM, Asafe Ribeiro <asafe.hai.kai at gmail.com>
>> > Does Happstack offer anything for internationalization ?
>> > _______________________________________________
>> > web-devel mailing list
>> > web-devel at haskell.org
>> > http://www.haskell.org/mailman/listinfo/web-devel
>> web-devel mailing list
>> web-devel at haskell.org
More information about the web-devel