我正在尝试使用 Nuxt/i18n 本地化 DateTime ,
但它不起作用!
这个我在 nuxt config 中配置 Nuxt/i18n
{
seo: true,
locales: [
{
code: 'en',
iso: 'en-US',
file: 'en.js',
dir: 'ltr',
name: 'English',
id: 2,
}
],
lazy: true,
langDir: 'locales/',
defaultLocale: 'en',
strategy: 'prefix_except_default',
dateTimeFormats: {
'en-US': {
short: {
year: 'numeric',
month: 'long',
day: 'numeric',
weekday: 'short',
},
long: {
year: 'numeric',
month: 'short',
day: 'numeric',
weekday: 'short',
hour: 'numeric',
minute: 'numeric',
},
},
},
},
我怎样才能解决这个问题 ?
我怎样才能解决这个问题 ?
我怎样才能解决这个问题 ?