mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-18 11:18:14 +08:00
chore: update docs and code style, ref: #7553#issuecomment-335009581
This commit is contained in:
parent
a3c3ec8070
commit
91fc781b6c
@ -10,14 +10,16 @@ import Item from './Item';
|
||||
|
||||
export { ListItemProps, ListItemMetaProps } from './Item';
|
||||
|
||||
export type ColumnType = 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;
|
||||
|
||||
export interface ListGridType {
|
||||
gutter?: number;
|
||||
column?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;
|
||||
xs?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;
|
||||
sm?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;
|
||||
md?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;
|
||||
lg?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;
|
||||
xl?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;
|
||||
column?: ColumnType;
|
||||
xs?: ColumnType;
|
||||
sm?: ColumnType;
|
||||
md?: ColumnType;
|
||||
lg?: ColumnType;
|
||||
xl?: ColumnType;
|
||||
}
|
||||
|
||||
export type ListSize = 'small' | 'default' | 'large';
|
||||
|
@ -3,8 +3,8 @@ order: 8
|
||||
title: Internationalization
|
||||
---
|
||||
|
||||
The default language of `antd@2.x` is Chinese as of yet.
|
||||
If you want to use English or other languages, you can follow the instructions below.
|
||||
The default language of `antd@2.x` is English as of yet.
|
||||
If you want to use other languages, you can follow the instructions below.
|
||||
|
||||
## LocaleProvider
|
||||
|
||||
@ -12,16 +12,16 @@ antd provides a React Component [LocaleProvider](/components/locale-provider) fo
|
||||
|
||||
```jsx
|
||||
import { LocaleProvider } from 'antd';
|
||||
import enUS from 'antd/lib/locale-provider/en_US';
|
||||
import frFR from 'antd/lib/locale-provider/fr_FR';
|
||||
|
||||
return (
|
||||
<LocaleProvider locale={enUS}>
|
||||
<LocaleProvider locale={frFR}>
|
||||
<App />
|
||||
</LocaleProvider>
|
||||
);
|
||||
```
|
||||
|
||||
Note: `en_US` is the filename, follow below.
|
||||
Note: `fr_FR` is the filename, follow below.
|
||||
|
||||
Supported languages:
|
||||
|
||||
@ -30,6 +30,7 @@ Supported languages:
|
||||
|Bulgarian|bg_BG|
|
||||
|Catalan|ca_ES|
|
||||
|Chinese (Traditional)|zh_TW|
|
||||
|Chinese (Simplified)|zh_CN|
|
||||
|Czech|cs_CZ|
|
||||
|Dutch (Belgium)|nl_BE|
|
||||
|Dutch|nl_NL|
|
||||
@ -55,9 +56,9 @@ Supported languages:
|
||||
|Slovak|sk_SK|
|
||||
|Spanish|es_ES|
|
||||
|Swedish|sv_SE|
|
||||
|Thai|th_TH|
|
||||
|Turkish|tr_TR|
|
||||
|Vietnamese|vi_VN|
|
||||
|Thai|th_TH|
|
||||
|
||||
See usage and ways to contribute a new locale package at [LocaleProvider](/components/locale-provider).
|
||||
|
||||
|
@ -3,23 +3,23 @@ order: 8
|
||||
title: 国际化
|
||||
---
|
||||
|
||||
`antd` 目前的默认文案是中文,如果需要使用英文或其他语言,可以参考下面的方案。
|
||||
`antd` 目前的默认文案是英文,如果需要使用其他语言,可以参考下面的方案。
|
||||
|
||||
## LocaleProvider
|
||||
|
||||
antd 提供了一个 React 组件 [LocaleProvider](/components/locale-provider) 用于全局配置国际化文案。
|
||||
|
||||
```jsx
|
||||
import enUS from 'antd/lib/locale-provider/en_US';
|
||||
import zhCN from 'antd/lib/locale-provider/zh_CN';
|
||||
|
||||
return (
|
||||
<LocaleProvider locale={enUS}>
|
||||
<LocaleProvider locale={zhCN}>
|
||||
<App />
|
||||
</LocaleProvider>
|
||||
);
|
||||
```
|
||||
|
||||
注意:`en_US` 是文件名,以下表格也遵循同样的规则。
|
||||
注意:`zh_CN` 是文件名,以下表格也遵循同样的规则。
|
||||
|
||||
目前支持以下语言:
|
||||
|
||||
@ -28,6 +28,7 @@ return (
|
||||
|保加利亚语|bg_BG|
|
||||
|加泰罗尼亚语|ca_ES|
|
||||
|繁体中文|zh_TW|
|
||||
|简体中文|zh_CN|
|
||||
|捷克语|cs_CZ|
|
||||
|比利时荷兰语|nl_BE|
|
||||
|荷兰语|nl_NL|
|
||||
@ -51,9 +52,9 @@ return (
|
||||
|斯洛伐克语|sk_SK|
|
||||
|西班牙语|es_ES|
|
||||
|瑞典语|sv_SE|
|
||||
|泰语|th_TH|
|
||||
|土耳其语|tr_TR|
|
||||
|越南语|vi_VN|
|
||||
|泰语|th_TH|
|
||||
|
||||
具体的使用方法和新语言包贡献方式请参考 [LocaleProvider 文档](/components/locale-provider)。
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user