You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What locale should be taken for an HTML page delivered with <html lang="en"> etc.?
MomentJS seems to use common ISO language codes (conforming to ISO 639-1) with a two letter country code where deemed relevant. The default en language is basically en-us if I see that correctly.
It might be nice to accept locales as defined in RFC5646 like en_UK or de_AT and map them to en-gb and de-at respectively. The ISO 3166-1 alpha-2 codes should be used to map to the available locales of momentjs. The correct differentiation between geographical territory (ISO 3166) and language spoken (ISO 639) is important as there are short names that are ambiguous: e.g. AF/af are Afghanistan and Afrikaans.
This topic should be explored and maybe even lead to a momentjs pull request instead of a mapping introduced here. Is there a momentjs documentation that defines what ISO/RFC is used for their namings? See also momentjs source code that reads the given locale identifier.
The text was updated successfully, but these errors were encountered:
uses en on en_UK instead of en-gb, but that's okay as en_UK is to be written as en_GB anyways
uses en-gb when en_GB is given
Seems to work. In b42b267 the default locale of the datetime-local-picker is set to en-gb and that is used when en only is specified as locale in the settings. American and other friends that prefer the MM/DD/YYYY format as a default now need to specify en-us. :-)
What locale should be taken for an HTML page delivered with
<html lang="en">
etc.?MomentJS seems to use common ISO language codes (conforming to ISO 639-1) with a two letter country code where deemed relevant. The default
en
language is basicallyen-us
if I see that correctly.It might be nice to accept locales as defined in RFC5646 like
en_UK
orde_AT
and map them toen-gb
andde-at
respectively. The ISO 3166-1 alpha-2 codes should be used to map to the available locales of momentjs. The correct differentiation between geographical territory (ISO 3166) and language spoken (ISO 639) is important as there are short names that are ambiguous: e.g.AF
/af
areAfghanistan
andAfrikaans
.This topic should be explored and maybe even lead to a momentjs pull request instead of a mapping introduced here. Is there a momentjs documentation that defines what ISO/RFC is used for their namings? See also momentjs source code that reads the given locale identifier.
The text was updated successfully, but these errors were encountered: