mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Create a base_locale attribute onto I18n object
- if "fr": return "fr" - if "fr_FR": return "fr"
This commit is contained in:
@@ -12,7 +12,7 @@ $(document).ready(function() {
|
||||
altInput: true,
|
||||
altFormat: Spree.translations.flatpickr_date_format,
|
||||
dateFormat: "Y-m-d",
|
||||
locale: I18n.locale,
|
||||
locale: I18n.base_locale,
|
||||
plugins: [
|
||||
ShortcutButtonsPlugin({
|
||||
button: [{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
: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']);
|
||||
|
||||
Reference in New Issue
Block a user