-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Language Variant File Names should be aligned with ISO 3166 #869
Comments
@timrwood there was a discussion about that some time ago, but I can't dig it up. What was your stand? |
I think we should treat language identifiers as being case insensitive and replace While language codes should technically have capitalized modifiers, it makes it easier for node to require languages in a consistent naming pattern. For reference, here are some examples of different valid language identifiers from CLDR. http://unicode.org/cldr/utility/languageid.jsp
I opened an issue at #963 to track this as well. |
Fixed by #985. All of these are now accepted: moment.lang('en-gb');
moment.lang('en-GB');
moment.lang('en_GB');
moment.lang('EN_GB'); |
nice! |
This ISO standard defines country codes in capitals:
http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
Also this standard defines language tags in the form de-AT or en-GB etc.
http://en.wikipedia.org/wiki/IETF_language_tag
Therefore, I think the files in the lang folder should be renamed to mach this form.
Currently we have en-gb.js but this should be en-GB.js
The text was updated successfully, but these errors were encountered: