Module: Ramaze::Helper::Localize
- Includes:
- Traited
- Defined in:
- lib/ramaze/helper/localize.rb
Defined Under Namespace
Classes: Dictionary, Parser
Instance Method Summary
collapse
Instance Method Details
17
18
19
|
# File 'lib/ramaze/helper/localize.rb', line 17
def locale
locales.first
end
|
21
22
23
|
# File 'lib/ramaze/helper/localize.rb', line 21
def locales
Parser.new(request).locales(ancestral_trait[:localize_locale])
end
|
#localize(string, substitute = nil) ⇒ Object
Also known as:
l
12
13
14
|
# File 'lib/ramaze/helper/localize.rb', line 12
def localize(string, substitute = nil)
localize_dictionary.translate(string, locales, substitute)
end
|