fabi1cazenave / webL10n

Client-side internationalization / localization library
http://fabi1cazenave.github.com/webL10n/
279 stars 71 forks source link

There is no place to specify the lang code of the default language #34

Open timdream opened 11 years ago

timdream commented 11 years ago

According the the doc, one should put the default lang under a [*] section, and all languages w/o a matching would match against that. So we would have:

[*]
greeting=Hello <-- an English string

[zh-TW]
greeting=您好

and when l10n.js loads in a fr-FR browser, we would have a localized event with evt.language set to fr-FR but the UI isn't actually French.

I currently workaround this limit by writing <html data-l10n-id="html"> and html.lang a entry for every language. Tell me if that's what you intended.