class Wrapper
A wrapper to provide easy access to locale related data in the request.
Definitions
def current_locale
Returns the current locale or nil if not localized.
Implementation
def current_locale
@env[CURRENT_LOCALE_KEY]
end
def default_locale
Returns the default locale or nil if not localized.
Implementation
def default_locale
localization && localization.default_locale
end
def all_locales
Returns an empty array if not localized.
Implementation
def all_locales
localization && localization.all_locales || []
end