Skip to content
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

I18N support #9

Open
c9s opened this issue Feb 29, 2012 · 5 comments
Open

I18N support #9

c9s opened this issue Feb 29, 2012 · 5 comments

Comments

@c9s
Copy link

c9s commented Feb 29, 2012

Hi,

does this library support i18n ? or any way to define i18n texts?

@janicki
Copy link

janicki commented Aug 17, 2012

It looks like you can pass a locale definition in toString(). Search for "January" in the source code to see an example of the JSON object format for a locale.

You could save some CPU by extending that existing array/map that only has one element for the default '' key, then you should be able to just pass the key to the toString(), rather than the whole JSON mess. (The docs hint at that... I haven't tried it.)

@arshaw
Copy link
Owner

arshaw commented Mar 31, 2013

above pull request #17 implements es

@arshaw
Copy link
Owner

arshaw commented Mar 31, 2013

@janicki, currently, you can just pass in the key (like '' or hypothetically 'es') and it will work. The method argument is settings but is overloaded to support object or string.

@arshaw
Copy link
Owner

arshaw commented Mar 31, 2013

@c9s, you are correct, XDate is very lacking on the i18n and it should ideally have a load of external JS files, each specifying it's own settings.

@elisechant
Copy link

elisechant commented Jan 2, 2020

This would be a great feature for the roadmap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants