ant-design / ant-design/pro-components

🧐[问题]pro Table 国际化修改疑问

Open
#8,885 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

### 🧐 问题描述
![image](https://github.com/user-attachments/assets/a541fe6f-ad06-4308-b64b-adfa771b6c89)
需要修改箭头的多语言
![image](https://github.com/user-attachments/assets/8276c466-5246-4a8c-8887-bcdc19f3f740)
const enLocale = {
tableForm: {
search: 'Query',
reset: 'Reset',
submit: 'Submit',
collapsed: 'Expand',
expand: 'Collapse',
inputPlaceholder: 'Please enter',
selectPlaceholder: 'Please select',
},
alert: {
clear: 'Clear',
},
tableToolBar: {
leftPin: 'Pin to left',
rightPin: 'Pin to right',
noPin: 'Unpinned',
leftFixedTitle: 'Fixed the left',
rightFixedTitle: 'Fixed the right',
noFixedTitle: 'Not Fixed',
reset: 'Reset',
columnDisplay: 'Column Display',
columnSetting: 'Settings',
fullScreen: 'Full Screen',
exitFullScreen: 'Exit Full Screen',
reload: 'Refresh',
density: 'Density',
densityDefault: 'Default',
densityLarger: 'Larger',
densityMiddle: 'Middle',
densitySmall: 'Compact',
},
};

// 生成 intl 对象
import { ProProvider } from '@ant-design/pro-components';
const enUSIntl = createIntl('en_US', enUS);
const values = useContext(ProProvider)

// 使用


;

参考官网文档修改不生效
### 💻 示例代码

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start with the ProProvider and ProTable usage shown in the issue, then compare the provided enUSIntl configuration with the official internationalization documentation. Confirm where the arrow labels are sourced and whether the custom locale is applied; done means the arrow text follows the supplied translations.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, internationalization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.