class

I18n::Config

Inherits Reference < Object

Instance methods

available_locales

Returns the available locales

Source
backend

Returns the current backend.

Source
backend=(backend : I18n::Backend::Base | Nil)

Sets the current backend. Used to set a custom backend.

Source
default_locale

Returns the current default locale. Defaults to :'en'

Source
default_locale=(new_default : String)
Source
default_separator

Returns the current default scope separator. Defaults to '.'

Source
default_separator=(separator : Char | Nil)

Sets the current default scope separator.

Source
exception_handler

Returns the current exception handler. Defaults to an instance of I18n::ExceptionHandler.

Source
exception_handler=(exception_handler : Nil | I18n::ExceptionHandler)

Sets the exception handler.

Source
load_path

Allow clients to register paths providing translation data sources. The backend defines acceptable sources.

E.g. the provided SimpleBackend accepts a list of paths to translation files which are either named *.rb and contain plain Ruby Hashes or are named *.yml and contain YAML data. So for the SimpleBackend clients may register translation files like this: I18n.load_path << 'path/to/locale/en.yml'

Source
load_path=(load_path : Nil | Array(String))

Sets the load path instance. Custom implementations are expected to behave like a Ruby Array.

Source
locale

The only configuration value that is not global and scoped to thread is :locale. It defaults to the default_locale.

Source
locale=(locale : Nil | String)

Sets the current locale pseudo-globally, i.e. in the Thread.current hash.

Source