mirror of
https://github.com/wassname/talk.git
synced 2026-07-02 22:14:11 +08:00
Moment settings based on users locale
This commit is contained in:
@@ -3,6 +3,7 @@ import has from 'lodash/has';
|
||||
import get from 'lodash/get';
|
||||
import merge from 'lodash/merge';
|
||||
|
||||
import moment from 'moment';
|
||||
import 'moment/locale/da';
|
||||
import 'moment/locale/es';
|
||||
import 'moment/locale/fr';
|
||||
@@ -45,6 +46,9 @@ function init() {
|
||||
const locale = getLocale();
|
||||
setLocale(locale);
|
||||
|
||||
// Setting moment
|
||||
moment.locale(locale);
|
||||
|
||||
// Extract language key.
|
||||
lang = locale.split('-')[0];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user