Languages and Countries
Language and Country support for input select fields using ISO Codes
- Language Codes
- 639-1
- Country Codes
- ISO 3166-1 Alpha-2
form_for helpers
<%= form_for(Language.new) do |f| %>
<%= f.label :name, "English Name to English Name" %>
<%= f.language_name_select :name, {}, id: "language[language_name_select]" %>
<% end %>
<%= form_for(Language.new) do |f| %>
<%= f.label :name, "Native Name to Native Name" %>
<%= f.language_native_select :name, {}, id: "language[language_native_select]" %>
<% end %>
<%= form_for(Language.new) do |f| %>
<%= f.label :name, "Language Code to Native Name" %>
<%= f.language_code_select :name, {}, id: "language[language_code_select]" %>
<% end %>
<%= form_for(Language.new) do |f| %>
<%= f.label :name, "English Country Name to English Country Name" %>
<%= f.country_name_select :name, {}, id: "language[country_name_select]" %>
<% end %>
<%= form_for(Language.new) do |f| %>
<%= f.label :name, "Code to English Country Name" %>
<%= f.country_code_select :name, {}, id: "language[country_code_select]" %>
<% end %>
form_tag helpers
<%= form_tag(languages_path) do %>
<%= label_tag :name, "English Name to English Name" %>
<%= language_name_select_tag :name, id: "language[language_name_select_tag]" %>
<% end %>
<%= form_tag(languages_path) do %>
<%= label_tag :name, "Native Name to Native Name" %>
<%= language_native_select_tag :name, id: "language[language_native_select_tag]" %>
<% end %>
<%= form_tag(languages_path) do %>
<%= label_tag :name, "Language Code to Native Name" %>
<%= language_code_select_tag :name, id: "language[language_code_select_tag]" %>
<% end %>
<%= form_tag(languages_path) do %>
<%= label_tag :name, "English Country Name to English Country Name" %>
<%= country_name_select_tag :name, id: "language[country_name_select_tag]" %>
<% end %>
<%= form_tag(languages_path) do %>
<%= label_tag :name, "Code to English Country Name" %>
<%= country_code_select_tag :name, id: "language[country_code_select_tag]" %>
<% end %>