localized_form_options_helpers.rb

Path: lib/features/localized_form_options_helpers.rb
Last Update: Mon Jun 25 20:25:44 +0200 2007

Localized country names

Localizes the country list of the FormOptionsHelper module. This country list is used by some helpers of this module (ie. country_options_for_select).

Used sections of the language file

  countries:
    Germany: Deutschland

This feature uses the countries section of the language file. This section contains a map used to replace the default countries with the ones specified. This is a simple replace operation so you don‘t need to translate all countries for this feature to work.

Constants

COUNTRIES = ArkanisDevelopment::SimpleLocalization::CachedLangSectionProxy.new :sections => [:countries], :orginal_receiver => ActionView::Helpers::FormOptionsHelper::COUNTRIES do |localized, orginal| orginal.collect{|original_country| localized[original_country] || original_country}

[Validate]