![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
localized_country_select
Advanced tools
= LocalizedCountrySelect
Rails plugin to provide support for localized menu with country names and for storing country information as country code (eg. 'es'), not name (eg. 'Spain'), in the database. Uses the Rails internationalization framework (I18n, http://rails-i18n.org) for translating the names of countries. Requires Rails 2.2 (released November 21st, 2008) or later versions. Country names are loaded from hashes in plugin directory, according to I18n.locale value. You can easily translate country codes in your application like this: <%= I18n.t @user.country, :scope => 'countries' %> Comes with a Rake task rails import:country_select LOCALE=de for importing country names from Unicode.org's CLDR repository (http://www.unicode.org/cldr/data/charts/summary/root.html) Don't forget to restart the application when you add new locale. ActionView helper code is adapted from Rails' default +country_select+ plugin (previously in core). See http://github.com/rails/country_select/tree/master/lib/country_select.rb == Rails 5 / Rails 6 In your Gemfile add: gem 'localized_country_select', '>= 0.10.2' == Rails 3 / Rails 4 In your Gemfile add: gem 'localized_country_select', '= 0.9.11' == Rails 2.3 No longer supported, but you can still use old version of gem. In environment.rb add config.gem 'localized_country_select', :version => '0.0.1' == Example Show full country names: <%= localized_country_select(:user, :country, [], {include_blank: 'Please choose...'}) %> will become: <select name="user[country]" id="user_country"> <option value="">Please choose...</option> <option disabled="disabled" value="">-------------</option> <option value="AF">Afghanistan</option> ... <option value="ZW">Zimbabwe</option> </select> Show only country codes: <%= localized_country_select(:user, :country, [], {include_blank: 'Please choose...', description: :abbreviated}) %> will become: <select name="user[country]" id="user_country"> <option value="">Please choose...</option> <option disabled="disabled" value="">-------------</option> <option value="AF">AF</option> ... <option value="ZW">ZW</option> </select> for the en locale. You can exclude countries by code using the exclude option (a single code or an array of country codes): localized_country_select(:user, :country, [], {exclude: [:ZZ, :US]}) == Formtastic and SimpleForm Gem supports (via alias_method) both formtastic and simple_form :country input == Other resources http://github.com/rails/country_select (Default Rails plugin) http://github.com/russ/country_code_select (Stores country code, not name) Copyright (c) 2008 Karel Minarik (www.karmi.cz), released under the MIT license
FAQs
Unknown package
We found that localized_country_select demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.