Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
i18n-country-translations
Advanced tools
{}[https://travis-ci.org/onomojo/i18n-country-translations]
= I18nCountryTranslations
The purpose of this gem is to simply provide country translations. The gem is intended to be easy to combine with other gems that require i18n country translations so we can have common i18n country translation gem.
If you're doing anything with country names and translations, there's no need to reinvent the wheel and add your own translations. Just use this gem's country translations and skip the hassle of having to add and manage each country translation for each locale.
== Supported Locales Locales we will include are specified by ISO 639-1 alpha2, http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes with some extra 3 character locale codes supported by Unicode, http://unicode.org/repos/cldr-tmp/trunk/diff/summary/root.html
== Supported Country Codes Country codes used are those specified in ISO 3166-2, http://en.wikipedia.org/wiki/ISO_3166-2:XK#Current_codes
== Installation
Add to your Gemfile:
gem 'i18n-country-translations'
== Usage
I18n.t(:US, :scope => :countries)
or
t(:US, :scope => :countries)
== Contributing
Most locale translations already exist but if you find an error or we're missing something, please submit a pull request.
Most of the locales were generated using this rake task which you might find useful somehow:
IMPORT_LOCALE=en rake import:country_translation
It will generate a new yml file that contains the country translations for the locale specified. Please note that some of the country translations may still be missing.
You can also use these standard translations to help if you don't want to use the script above: http://unicode.org/repos/cldr-tmp/trunk/diff/summary/root.html
== Related You may also be intersted in the i18n_country_select gem which basically gives you a helper to make use of these translations in a coutry select dropdown. https://github.com/onomojo/i18n_country_select
If you need to use timezones, we also created a convenient way to translate the default Rails timezones with the gem i18n-timezones https://github.com/onomojo/i18n-timezones
== License MIT or GPL
== Special thanks https://github.com/svenfuchs/rails-i18n
FAQs
Unknown package
We found that i18n-country-translations demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.