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

Internationalization support? #44

Open
ilyabreev opened this issue Dec 25, 2015 · 7 comments
Open

Internationalization support? #44

ilyabreev opened this issue Dec 25, 2015 · 7 comments

Comments

@ilyabreev
Copy link

Do you plan to add internationalization support to your package?
I think it may be very useful for non-english development targets.

@evdb
Copy link
Member

evdb commented Jan 13, 2016

I'd be interested to try. What sort of things do you think need to be internalionatized? How do you think it would be easiest for the end users to use the i18n?

@ilyabreev
Copy link
Author

I think that primary goal is to localize country names. It'll simplify lookup of country in native language.
If I have textbox with dropdown on my web page, for example, to make autocomplete and then get all information about country.

In terms of code it can be done if lookup parameter will become a function:

var lookup = require('country-data').lookup('ru');

and then all subsequent calls to lookup functions will use russian (as in the example above) language for querying on name parameter.
To change language you need to create another lookup object. It seems to be the appropriate way.

@evdb
Copy link
Member

evdb commented Jan 13, 2016

Country names, and currency names too I suppose.

I don't think I would provide a look up function to do the conversion.
Instead I would provide the data required for native internationalisation
routines to use. That way if an app already has an i18n solution they can
continue to use it.

Perhaps providing the translations in gettext compatible files which can
then be adapted to other translation setups?

Does that seem sensible to you?
On Wed, 13 Jan 2016 at 15:02, Ilya Breev [email protected] wrote:

I think that primary goal is to localize country names. It'll simplify
lookup of country in native language.
If I have textbox with dropdown on my web page, for example, to make
autocomplete and then get all information about country.

In terms of code it can be done if lookup parameter will become a
function:

var lookup = require('country-data').lookup('ru');

and then all subsequent calls to lookup functions will use russian (as in
the example above) language for querying on name parameter.
To change language you need to create another lookup object. It seems to
be the appropriate way.


Reply to this email directly or view it on GitHub
#44 (comment)
.

@ilyabreev
Copy link
Author

It's a great idea!

@ilyabreev
Copy link
Author

I'd participate in translation into russian, for example.

@PhilippMi
Copy link

Any progress on this issue? I would like to have this feature too.

@evdb
Copy link
Member

evdb commented Jul 31, 2016

It is not something that I personally have a need for. Pull requests
welcome :)
On Thu, 14 Jul 2016 at 16:13, Philipp Mitterer [email protected]
wrote:

Any progress on this issue? I would like to have this feature too.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#44 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AALc7sog09Q7mQqjx0aJSWdjPYRWIbkdks5qVkQPgaJpZM4G7Vwh
.

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

3 participants