Switch from TLD to two letter language code ? #293

Closed
timrwood opened this Issue Apr 30, 2012 · 6 comments

Projects

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 :)

Contributor

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.

Owner
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
}
Owner

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.

Owner

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
Contributor

Good.

@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
ca30a14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment