Module: Localization
- Extended by:
- Log
- Defined in:
- lib/RubyExt/Localization.rb
Constant Summary
collapse
- DEFAULT_LANGUAGE =
:en
- RESOURCE_EXTENSION =
"localization.yaml"
Class Method Summary
collapse
Methods included from Log
error, info, log, log, warn
Class Method Details
.default_language ⇒ Object
11
12
13
|
# File 'lib/RubyExt/Localization.rb', line 11
def default_language
@default_language ||= DEFAULT_LANGUAGE
end
|
.default_language=(lang) ⇒ Object
7
8
9
|
# File 'lib/RubyExt/Localization.rb', line 7
def default_language= lang
@default_language = lang
end
|
19
20
21
22
23
24
25
26
|
# File 'lib/RubyExt/Localization.rb', line 19
def language
if @language
lang = @language.call
return lang || default_language
else
return default_language
end
end
|
.language=(block) ⇒ Object
15
16
17
|
# File 'lib/RubyExt/Localization.rb', line 15
def language= block
@language = block
end
|