Class: RubyApp::Language

Inherits:
R18n::I18n
  • Object
show all
Extended by:
Mixins::DelegateMixin
Defined in:
lib/ruby_app/language.rb

Class Method Summary collapse

Methods included from Mixins::DelegateMixin

method_missing

Class Method Details

.getObject



14
15
16
# File 'lib/ruby_app/language.rb', line 14

def self.get
  R18n.get
end

.load!Object



18
19
20
21
22
23
24
25
26
27
# File 'lib/ruby_app/language.rb', line 18

def self.load!
  R18n.thread_set(RubyApp::Language.new(RubyApp::Request.language, RubyApp::Application.options.translations_paths))
  if block_given?
    begin
      yield
    ensure
      self.unload!
    end
  end
end

.unload!Object



29
30
31
# File 'lib/ruby_app/language.rb', line 29

def self.unload!
  R18n.thread_set(nil)
end