lib/refinery/i18n.rb in refinerycms-i18n-2.0.2 vs lib/refinery/i18n.rb in refinerycms-i18n-2.1.0

- old
+ new

@@ -1,8 +1,9 @@ # Encoding: UTF-8 <-- required, please leave this in. require 'refinerycms-core' require 'routing-filter' +require 'rails-i18n' module Refinery autoload :I18nGenerator, 'generators/refinery/i18n_generator' module I18n @@ -12,29 +13,32 @@ def built_in_locales @built_in_locales ||= { :en => 'English', :fr => 'Français', :nl => 'Nederlands', - :'pt-BR' => 'Português', + :pt => 'Português', + :'pt-BR' => 'Português brasileiro', :da => 'Dansk', :nb => 'Norsk Bokmål', :sl => 'Slovenian', :es => 'Español', :it => 'Italiano', :de => 'Deutsch', :lv => 'Latviski', :ru => 'Русский', :sv => 'Svenska', :pl => 'Polski', - :'zh-CN' => 'Simplified Chinese', - :'zh-TW' => 'Traditional Chinese', + :'zh-CN' => '简体中文', + :'zh-TW' => '繁體中文', :el => 'Ελληνικά', :rs => 'Srpski', :cs => 'Česky', :sk => 'Slovenský', :ja => '日本語', - :bg => 'Български' + :bg => 'Български', + :hu => 'Hungarian', + :uk => 'Українська' } end def current_frontend_locale if Globalize.locale.present? && Globalize.locale.to_s != config.default_frontend_locale.to_s @@ -44,11 +48,11 @@ else ::I18n.locale end end - def enabled? - config.enabled + def url_filter_enabled? + config.url_filter_enabled end def has_locale?(locale) config.locales.has_key?(locale.try(:to_sym)) end