onomojo / i18n_country_select Goto Github PK
View Code? Open in Web Editor NEWThis project forked from manafire/country_code_select
A Rails select form helper using country codes for I18n translations
License: MIT License
This project forked from manafire/country_code_select
A Rails select form helper using country codes for I18n translations
License: MIT License
With locale -> zh-CN
This code -> country_code_select(:user, :country)
Generates list of countries in English and Chinese inside one dropbox
I believe there's currently no way to force a selected value besides the field value. It would be nice if options
accepted selected: 'country_code'
, just like the regular select
. I could work on a pull request for this, let me know.
Is there a reason why the countries that are included in the select is not in sync with the countries available in the i18n_country_select gem? The one I need included is AX, Åland Islands.
I18n.backend.send(:translations)[:en][:countries].keys.map(&:to_s) - I18nCountrySelect::Countries::COUNTRY_CODES
This gem depends on the i18n gem as written in the Gemfile:
s.add_dependency('i18n', '~> 0.9.3')
While trying to update other components, we have the issue that as of now, i18n is at 1.8.2 which does not seem to be compatible here.
Any chance this could be resolved? Is there any breaking changes in i18n that would prevent loosing this dependency to something like s.add_dependency('i18n', '>= 0.9.3')
Thanks
There is a select option for the "Unknown Region" with key "ZZ" available.
What is the purpose of this entry?
I'd propose to remove it as this breaks the intent to select a known country on earth. If the country is not known to the user, a blank option is enough to indicate this or the application should deal with it otherwise.
What do you think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.