Browse Source

Set the Moment.js locale

dohseven 3 years ago
parent
commit
c5187172f6
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      flatisfy/web/js_src/i18n/index.js

+ 4
- 0
flatisfy/web/js_src/i18n/index.js View File

@@ -1,5 +1,6 @@
1 1
 import Vue from 'vue'
2 2
 import VueI18n from 'vue-i18n'
3
+import moment from 'moment'
3 4
 
4 5
 // Import translations
5 6
 import en from './en'
@@ -48,6 +49,9 @@ for (var i = 0; i < locales.length; ++i) {
48 49
     }
49 50
 }
50 51
 
52
+// Set the locale for Moment.js
53
+moment.locale(locale)
54
+
51 55
 export default new VueI18n({
52 56
     locale: locale,
53 57
     messages