Fetcher/g11n

View on GitHub
lib/g11n/configuration.rb

Summary

Maintainability
A
0 mins
Test Coverage
module G11n
  # DSL for the configuration of G11n
  module Configuration    
    # Sets the translations path
    def path the_path = nil
      Translator.instance.translations_path = the_path + "/" if the_path
      Translator.instance.translations_path
    end
    
    # Sets or get the locale
    def locale the_locale = nil
      Translator.instance.locale = the_locale if the_locale
      Translator.instance.locale
    end
  end
end