modern-js-cheatsheet icon indicating copy to clipboard operation
modern-js-cheatsheet copied to clipboard

The defaultlocale parameter configuration is invalid

Open yangdan8 opened this issue 3 years ago • 2 comments

import ElementPlus from 'unplugin-element-plus/vite';
ElementPlus({
     useSource: false,
     defaultLocale: 'zh-cn',
})

yangdan8 avatar Oct 28 '21 12:10 yangdan8

Method-1: You need to set the localeDetection as false:

e.g import ElementPlus from 'unplugin-element-plus/vite'; ElementPlus({ useSource: false, defaultLocale: 'zh-cn',, localeDetection: false, })

Resourses: 1-https://stackoverflow.com/questions/66730980/defaultlocale-is-not-keeping-default-lang-in-next-js-i18n

Method-2 2-https://www.npmjs.com/package/unplugin-element-plus

Under the second link check the following images/links:

Step1: Go the github page and check options

image

OR Step2: Click on 'here'

image

Step3: Check the 'zh-cn.ts'file

image

Muhammad-Faraz-Ali avatar Sep 22 '22 11:09 Muhammad-Faraz-Ali

您好,我已收到您的邮件,祝您天天开心,工作顺利。

jiangx831 avatar Oct 11 '22 09:10 jiangx831