GRN2-xx: Added fallback language to locales (#788)

* Added fallback language to locales

* Added comments
This commit is contained in:
Ahmad Farhat
2019-09-06 14:28:47 -04:00
committed by Jesus Federico
parent 2090b9f8e6
commit b590a5a264
5 changed files with 41 additions and 9 deletions

View File

@ -102,7 +102,13 @@ module ApplicationHelper
# Return all the translations available in the client side through javascript
def current_translations
@translations ||= I18n.backend.send(:translations)
@translations[I18n.locale].with_indifferent_access
@translations[I18n.locale]
end
# Return the fallback translations available in the client side through javascript
def fallback_translations
@fallback_translations ||= I18n.backend.send(:translations)
@fallback_translations[I18n.default_locale]
end
# Returns the page that the logo redirects to when clicked on