Module: G11n::Configuration

Included in:
G11n
Defined in:
lib/g11n/configuration.rb

Overview

DSL for the configuration of G11n

Instance Method Summary collapse

Instance Method Details

#locale(the_locale = nil) ⇒ Object

Sets or get the locale



11
12
13
14
# File 'lib/g11n/configuration.rb', line 11

def locale the_locale = nil
  Translator.instance.locale = the_locale if the_locale
  Translator.instance.locale
end

#path(the_path = nil) ⇒ Object

Sets the translations path



5
6
7
8
# File 'lib/g11n/configuration.rb', line 5

def path the_path = nil
  Translator.instance.translations_path = the_path + "/" if the_path
  Translator.instance.translations_path
end