module Ramaze::Helper::Localize
The localization helper can be used to output translated strings. This enables your application to use multiple language files for English, Dutch and so on.
Public Instance Methods
locale()
click to toggle source
# File lib/ramaze/helper/localize.rb, line 22 def locale locales.first end
locales()
click to toggle source
# File lib/ramaze/helper/localize.rb, line 26 def locales locales = request.env['localize.locales'] return locales if locales fallback = ancestral_trait[:localize_locale] locales = Parser.new(request).locales(fallback) request.env['localize.locales'] = locales end
localize(string, substitute = nil)
click to toggle source
# File lib/ramaze/helper/localize.rb, line 17 def localize(string, substitute = nil) localize_dictionary.translate(string, locales, substitute) end
Also aliased as: l