Skip to content

DatePicker 组件中文本地化不完整,部分内容仍显示英文 #8214

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

Open
1 task done
setube opened this issue May 31, 2025 · 0 comments
Open
1 task done

Comments

@setube
Copy link

setube commented May 31, 2025

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.2.6

Environment

  • Vue 3.2.47
  • Node.js 16.14.0
  • 操作系统:Windows 10

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. 创建一个新的 Vue 组件
  2. 引入 DatePicker 组件和中文语言包:
import { DatePicker } from 'ant-design-vue'
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN'
  1. 在模板中使用 DatePicker 组件:
<template>
<a-range-picker v-model:value="dateRange" :locale="locale" />
</template>

What is expected?

DatePicker 组件应该完全显示中文,包括:

  • 月份名称(一月、二月等)
  • 星期名称(星期一、星期二等)
  • 日期格式(YYYY年MM月DD日)
  • 快捷选项(今天、本周、本月等)
  • 按钮文本(确定、取消等)

What is actually happening?

只有部分内容显示为中文,其他内容仍显示为英文:

  • 月份名称显示为英文(January、February等)
  • 星期名称显示为英文(Monday、Tuesday等)
  • 日期格式显示为英文(YYYY-MM-DD)
  • 快捷选项部分显示为英文
  • 按钮文本显示为英文(OK、Cancel)

这个问题在业务场景中影响了用户体验,特别是在需要完全中文化的管理后台系统中。虽然设置了 :locale="locale" 属性,但本地化效果不完整,导致界面语言不统一。

建议检查 locale 配置是否完整,或者考虑在文档中明确说明当前版本的中文本地化支持程度。

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

1 participant