Module: Sgtn
- Extended by:
- Forwardable, Pseudo, SgtnClient::Fallbacks, SgtnClient::Translation::Implementation
- Defined in:
- lib/singleton-client.rb,
lib/singleton-client/pseudo.rb,
lib/singleton-client/i18n_backend.rb
Overview
:nodoc:
Defined Under Namespace
Modules: Pseudo Classes: I18nBackend
Constant Summary collapse
- PSEUDO_LOCALE =
'pseudo'.freeze
Class Method Summary collapse
-
.load_config(config_file, env) ⇒ Object
load configurations from a file.
- .with_locale(tmp_locale = nil) ⇒ Object
Methods included from SgtnClient::Translation::Implementation
getString, getString_f, getString_p, getStrings, get_translations, get_translations!, translate, translate!
Class Method Details
.load_config(config_file, env) ⇒ Object
load configurations from a file
21 22 23 |
# File 'lib/singleton-client.rb', line 21 def load_config(config_file, env) SgtnClient.load(config_file, env) end |
.with_locale(tmp_locale = nil) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/singleton-client.rb', line 25 def with_locale(tmp_locale = nil) if tmp_locale.nil? yield else current_locale = locale self.locale = tmp_locale begin yield ensure self.locale = current_locale end end end |