Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何切换为中文 #76

Open
qiuhengyu opened this issue May 7, 2024 · 1 comment
Open

如何切换为中文 #76

qiuhengyu opened this issue May 7, 2024 · 1 comment

Comments

@qiuhengyu
Copy link

如何把page等组件用中文显示呢?

@Keystion
Copy link

Keystion commented May 9, 2024

<script setup lang="ts">

import zhCn from "element-plus/es/locale/lang/zh-cn";

</script>

<template>
  <el-config-provider :locale="zhCn">
    <NuxtLayout>
      <NuxtPage />
    </NuxtLayout>
  </el-config-provider>
</template>

locale 接收一个对象,多语言切换,写个映射即可。

更多 el-config-provider 配置查看 packages/components/config-provider/src/config-provider-props.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants