Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

countries_and_languages

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

countries_and_languages

  • 0.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Countries and languages in I18n.locale

In currently 85 languages supplied by I18nData.
Languages and countries are stored as iso 639/iso 3166 - 2 letter code.
Methods are available in views.

@user.country == 'de'
@user.language == 'de'

User is from <%=country(@user.country)%> and speaks <%=language(@user.language)%>
User is from Germany and speaks German.

Please select you language <%=f.select_tag(:language,options_for_select(languages))%>
Select box with all 185 localized languages.

If you have special needs like renaming countries or only displaying a subset, have a look at the code and overwrite as necessary.

DEMO can be found in Gettext example application

Install

gem install countries_and_languages

# Gemfile
gem 'countries_and_languages', :require => 'countries_and_languages/rails'

Author

Michael Grosser
michael@grosser.it
License: MIT Build Status

FAQs

Package last updated on 22 Jun 2012

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc