Switch from TLD to two letter language code ? #293

timrwood opened this Issue Apr 30, 2012 · 6 comments


None yet

3 participants

smagch commented May 1, 2012

TLD represents nationality, not languages. So "jp" means Japan, not japanese. It'll be good to change it when bump up to next major version. Or just make aliases for backward compatibility for the time being and drop TDL locale code when it bump up to next next major version :)


I'm a fan of this change. It won't affect browser developers, because they download the language files separately. Like @smagch said, we could add the new definitions in 1.7.0 and drop the old ones in 2.0.0.

timrwood commented May 1, 2012

Should be an easy enough change as well.

if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
    this.moment.lang('jp', lang); // removed in 2.0.0
    this.moment.lang('ja', lang); // added in 1.7.0

Relevant commit 01618d4 added comments with author name and full language name.

Still need to make a map of langs that will need to change.


Here are the fixed lang names.

jp > ja
kr > ko
@timrwood timrwood added a commit that referenced this issue Jul 25, 2012
@timrwood timrwood Language updates #293 65db92e


@timrwood timrwood closed this Jul 25, 2012
@timrwood timrwood added a commit that referenced this issue Jan 14, 2013
@timrwood timrwood removing kr and jp files #293 12cef5d
@timrwood timrwood added a commit that referenced this issue Jan 15, 2013
@timrwood timrwood Merge branch 'develop' of github.com:timrwood/moment into develop
* 'develop' of github.com:timrwood/moment:
  removing kr and jp files #293
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment