forked from External/greenlight
18 lines
369 B
Ruby
18 lines
369 B
Ruby
module ApplicationHelper
|
|
def client_translations
|
|
locale = I18n.locale
|
|
if locale.length < 4
|
|
fallback_locale = I18n.fallbacks[locale].second
|
|
end
|
|
|
|
if fallback_locale
|
|
I18n.locale = fallback_locale
|
|
translations = I18n.t('.')
|
|
I18n.locale = locale
|
|
else
|
|
translations = I18n.t('.')
|
|
end
|
|
translations[:client]
|
|
end
|
|
end
|