lib/g11n/configuration.rb in g11n-0.0.2 vs lib/g11n/configuration.rb in g11n-0.0.3
- old
+ new
@@ -4,11 +4,12 @@
# Sets the translations path
def path the_path
Translator.instance.translations_path = the_path + "/"
end
- # Sets the locale
- def locale the_locale
- Translator.instance.locale = the_locale
+ # Sets or get the locale
+ def locale the_locale = nil
+ Translator.instance.locale = the_locale if the_locale
+ Translator.instance.locale
end
end
end