[web-devel] Happstack internationalization and localization

Greg Weber greg at gregweber.info
Mon Dec 12 10:54:15 CET 2011


I would much prefer something like Text.Shakespeare.I18n and
shakespeare-i18n or shakespeare-translate over requiring an extra mental
translation step to understand the name. Especially since this is under the
hood, there is no reason to try to give it a themed name.

On Mon, Dec 12, 2011 at 5:01 AM, Michael Snoyman <michael at snoyman.com>wrote:

> 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)?
>
> Michael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20111212/a131248a/attachment.htm>


More information about the web-devel mailing list