-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
No way to access country data to localize country names #8
Comments
Hmm interesting. I was thinking it would be good to add localised country names in brackets anyway (like the gmail signup form). Would this solve your problem? Otherwise, I could probably provide getters and setters for the country data without too much trouble, but I likely wont have time to work on this until next week. Obviously I'm open to pull requests :) |
I have now added the localised country names. Check it out and let me know if it solves your issue. |
I have now also added a getter and setter for the country data, so it's all yours. |
Sorry for the late reply, i wasn't in the office for the past days. Either way, thanks a bunch for the work! I wouldn't have minded doing it too, but you saved me a bit of time. There's only one thing that you might or might not regard as an issue: Since the country data is only being read when initializing a dropdown, i need to change it before initializing any dropdowns, but there's no way to access the country data without having an initialized dropdown, so i need to do this:
It works, but isn't necessarily the best API. :) |
It seems we need a static getter and setter. Could you try the solution posted here and see if that works? http:https://stackoverflow.com/questions/9364129/how-do-i-create-a-static-method-for-a-jquery-plugin |
Sure, i'll let you know tomorrow how it works out. :) |
Ok I just implemented the static getter and setter. Here is an example of how you could use it to modify the country data before you instantiate the plugin:
Does that solve your problem? |
I'm working on a website that uses the javascript included in https://metacpan.org/module/Locale::Simple to localize various strings with data from our PO files. I'd like to localize the country names of intl-tel-input as well, but you've done an extremely good job of making that inaccessible it seems. Can you advise on a way to do this, or maybe implement some public interface towards the country data, so i can do this without forking the JS?
The text was updated successfully, but these errors were encountered: