lib/refinery/i18n.rb in refinerycms-i18n-0.9.8.6 vs lib/refinery/i18n.rb in refinerycms-i18n-0.9.8.7

- old
+ new

@@ -73,15 +73,15 @@ def current_locale unless enabled? ::Refinery::I18n.current_locale = ::Refinery::I18n.default_locale else - @current_locale ||= RefinerySetting.find_or_set(:i18n_translation_current_locale, + (@current_locale ||= RefinerySetting.find_or_set(:i18n_translation_current_locale, ::Refinery::I18n.default_locale, { :scoping => 'refinery', :callback_proc_as_string => %q{::Refinery::I18n.setup!} - }) + })).to_sym end end def current_locale=(locale) @current_locale = locale.to_sym @@ -95,26 +95,26 @@ RefinerySetting.set(:i18n_translation_current_locale, value) else RefinerySetting[:i18n_translation_current_locale] = value end - ::I18n.locale = locale.to_sym + ::I18n.locale = @current_locale end def default_locale - @default_locale ||= RefinerySetting.find_or_set(:i18n_translation_default_locale, + (@default_locale ||= RefinerySetting.find_or_set(:i18n_translation_default_locale, :en, { :callback_proc_as_string => %q{::Refinery::I18n.setup!}, :scoping => 'refinery' - }) + })).to_sym end def default_frontend_locale - @default_frontend_locale ||= RefinerySetting.find_or_set(:i18n_translation_default_frontend_locale, + (@default_frontend_locale ||= RefinerySetting.find_or_set(:i18n_translation_default_frontend_locale, :en, { :scoping => 'refinery', :callback_proc_as_string => %q{::Refinery::I18n.setup!} - }) + })).to_sym end def locales @locales ||= RefinerySetting.find_or_set(:i18n_translation_locales, { :en => 'English', \ No newline at end of file