PolymerElements / app-localize-behavior

Polymer behaviour to help internationalize your application
48 stars 54 forks source link

Support usage of lang attribute <html lang="fr"> as default language value #105

Closed JaySunSyn closed 1 year ago

JaySunSyn commented 7 years ago

Use document.documentElement.lang = "de" to change the language within the whole app.

What do you think?

JaySunSyn commented 7 years ago

Thanks! Guess, we first need to agree on a concept.

We have 2 options here, the browser language navigator.language and the language set in the html tag which reflects the default app (default?) language.

Would you only pick one of those and if, which one?

I'd prefer to use the browser language and as a fallback the language set on the html tag. Would you agree?

notwaldorf commented 6 years ago

I think if I were to pick only one, it would be the language on the html tag. navigator.language isn't supported in IE11 and old Safari versions (so we can't use it)