I'm trying to use French version of moment, but moment.locale('fr')
doesn't work and it doesn't change the language:
console.debug(moment.locale());
moment.locale('fr');
console.debug(moment.locale());
console.debug(moment.locales());
output :
en
en
TypeError: moment.locales is not a function
gulpfile.js:
var path={
js:
[
{
src:
[
'bower_components/moment/min/moment.min.js',
'bower_components/moment/locale/fr.js',
...
You need to import the french definition
import 'moment/locale/fr'
moment.locale('fr')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.