mbeaudru / modern-js-cheatsheet

Cheatsheet for the JavaScript knowledge you will frequently encounter in modern projects.
https://mbeaudru.github.io/modern-js-cheatsheet/
MIT License
25.38k stars 3.17k forks source link

The defaultlocale parameter configuration is invalid #129

Open yangdan8 opened 3 years ago

yangdan8 commented 3 years ago
import ElementPlus from 'unplugin-element-plus/vite';
ElementPlus({
      useSource: false,
      defaultLocale: 'zh-cn',
})
Muhammad-Faraz-Ali commented 2 years ago

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

jiangx831 commented 2 years ago

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