diff --git a/app/assets/javascripts/admin/util.js.erb b/app/assets/javascripts/admin/util.js.erb index 4bc9132c43..cc5f32f843 100644 --- a/app/assets/javascripts/admin/util.js.erb +++ b/app/assets/javascripts/admin/util.js.erb @@ -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: [{ diff --git a/app/views/layouts/_i18n_script.html.haml b/app/views/layouts/_i18n_script.html.haml index 70cfafba83..504579d81e 100644 --- a/app/views/layouts/_i18n_script.html.haml +++ b/app/views/layouts/_i18n_script.html.haml @@ -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']);