[web-devel] multiple user interface languages

Alberto G. Corona agocorona at gmail.com
Fri Feb 4 15:09:24 CET 2011


Are there any high level, efficient, transparent way to handle multilanguage
appkications?  (I mean UI languages, that is languages that people use to
communicate)

There are many "dirty" ways to handle it . But none are satisfactory. Either
to..

1) Store the string in a database and perform inefficient queries to compose
the page (optionally with caching). The user interface code is not
particulary elegant.

2) Store the string and string constants in a separate module for each
language. It is as efficient at it can be. but not particularly elegant.

3) Create multiple pages, one fo each language  It is.fast at rumtime, but
at the cost of duplication of the embedded code, o it is not very
maintainable.


Time ago i used the option 2 for my first Haskell web application, So every
page had at the botton a runtime asignation of the language strings used in
the page:

       (yesvar, novar)=case lang of
                        "es" -> (LangEs.yes, LangEs.no)
                        _     -> (LangEn.yes, LangEn.no)

For yes/no strings


I don´t like it.  Any other alternative?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110204/e0a3930d/attachment.htm>


More information about the web-devel mailing list