Files
openfoodnetwork/app/views/layouts/_i18n_script.html.haml
Jean-Baptiste Bellet f39cc49cd2 Create a base_locale attribute onto I18n object
- if "fr": return "fr"
 - if "fr_FR": return "fr"
2021-07-23 14:14:20 +02:00

7 lines
220 B
Plaintext

:javascript
I18n.default_locale = "#{I18n.default_locale}";
I18n.base_locale = "#{I18n.locale.to_s.split('_').first}";
I18n.locale = "#{I18n.locale}";
I18n.fallbacks = true;
moment.locale([I18n.locale, 'en']);