From: Jeroen Ruigrok van der Werven (asmodai@in-nomine.org)
Date: Sat Apr 18 2009 - 03:02:34 CDT
-On [20090418 05:22], Ed Trager (ed.trager@gmail.com) wrote:
>If we can detect the user's locale, we can present the form immediately in the
>language specified by (any non-English) locale instead of the English
>fallback. Of course we will still have the drop-down selection list so users
>can still get any of the alternative language versions of the form if they
>want.
With Babel we just use HTTP's Accept-Language.
>So my 2nd question: Beyond the basic "language" code ("en", "th", "fr", etc.) I
>guess there is no reliable way within the browser environment to determine more
>specific locale information?
Not that I know of. With Babel we have a mapping table for mapping such
generic categories to a specific locale.
>For example, (3rd question...) am I correct in assuming that I *cannot*
>determine date format preferences? For example, if a browser like Opera is
>only going to tell me "en" and not "en-GB" or "en-US" or "en-AnywhereElse",
>then I guess there's no way to localize the date format to a preferred locale?
No, you will have to make an assumption.
>(4th Question ...) So I guess it is completely moot to think one could find
>out about preferred currency or numeric formats, or anything else that a
>"thick" client might be able to discover from operating system environment
>variables that I suppose are never really exposed within the browser
>environment?
Nope, again you will have to either make an assumption or use whatever
HTTP's Accept-Language gives you.
-- Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B Als men blijft geloven kan de zwaarste steen niet zinken...
This archive was generated by hypermail 2.1.5 : Sat Apr 18 2009 - 03:05:40 CDT