Sha256: 690d40318c324e4fb15130c37eb469d30a42ff57010d560baeaa221a5a08af02
Contents?: true
Size: 544 Bytes
Versions: 45
Compression:
Stored size: 544 Bytes
Contents
I18n::Config # autoload module I18n class Config def locale FastGettext.locale.gsub("_","-").to_sym end def locale=(new_locale) FastGettext.locale=(new_locale) end end # backport I18n.with_locale if it does not exist # Executes block with given I18n.locale set. def self.with_locale(tmp_locale = nil) if tmp_locale current_locale = self.locale self.locale = tmp_locale end yield ensure self.locale = current_locale if tmp_locale end unless defined? I18n.with_locale end
Version data entries
45 entries across 45 versions & 1 rubygems