mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 19:19:26 +08:00
feat: add th_TH translation (#6721)
This commit is contained in:
parent
87932504b4
commit
bc7e0bad3e
2
components/calendar/locale/th_TH.tsx
Normal file
2
components/calendar/locale/th_TH.tsx
Normal file
@ -0,0 +1,2 @@
|
||||
import th_TH from '../../date-picker/locale/th_TH';
|
||||
export default th_TH;
|
17
components/date-picker/locale/th_TH.tsx
Normal file
17
components/date-picker/locale/th_TH.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import CalendarLocale from 'rc-calendar/lib/locale/th_TH';
|
||||
import TimePickerLocale from '../../time-picker/locale/th_TH';
|
||||
import assign from 'object-assign';
|
||||
|
||||
// Merge into a locale object
|
||||
const locale = {
|
||||
lang: assign({
|
||||
placeholder: 'เลือกวันที่',
|
||||
rangePlaceholder: ['วันเริ่มต้น', 'วันสิ้นสุด'],
|
||||
}, CalendarLocale),
|
||||
timePickerLocale: assign({}, TimePickerLocale),
|
||||
};
|
||||
|
||||
// All settings at:
|
||||
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
|
||||
|
||||
export default locale;
|
@ -27,8 +27,9 @@ import fiFI from '../fi_FI';
|
||||
import plPL from '../pl_PL';
|
||||
import bgBG from '../bg_BG';
|
||||
import viVN from '../vi_VN';
|
||||
import thTH from '../th_TH';
|
||||
|
||||
const locales = [enUS, ptBR, ruRU, esES, svSE, frBE, deDE, nlNL, caES, csCZ, koKR, etEE, skSK, jaJP, trTR, zhTW, fiFI, plPL, bgBG, enGB, frFR, nlBE, itIT, viVN];
|
||||
const locales = [enUS, ptBR, ruRU, esES, svSE, frBE, deDE, nlNL, caES, csCZ, koKR, etEE, skSK, jaJP, trTR, zhTW, fiFI, plPL, bgBG, enGB, frFR, nlBE, itIT, viVN, thTH];
|
||||
|
||||
const Option = Select.Option;
|
||||
const RangePicker = DatePicker.RangePicker;
|
||||
|
47
components/locale-provider/th_TH.tsx
Normal file
47
components/locale-provider/th_TH.tsx
Normal file
@ -0,0 +1,47 @@
|
||||
import moment from 'moment';
|
||||
moment.locale('th');
|
||||
|
||||
import Pagination from 'rc-pagination/lib/locale/th_TH';
|
||||
import DatePicker from '../date-picker/locale/th_TH';
|
||||
import TimePicker from '../time-picker/locale/th_TH';
|
||||
import Calendar from '../calendar/locale/th_TH';
|
||||
|
||||
export default {
|
||||
locale: 'th',
|
||||
Pagination,
|
||||
DatePicker,
|
||||
TimePicker,
|
||||
Calendar,
|
||||
Table: {
|
||||
filterTitle: 'ตัวกรอง',
|
||||
filterConfirm: 'ยืนยัน',
|
||||
filterReset: 'รีเซ็ต',
|
||||
emptyText: 'ไม่มีข้อมูล',
|
||||
selectAll: 'เลือกทั้งหมดในหน้านี้',
|
||||
selectInvert: 'เลือกสถานะตรงกันข้าม',
|
||||
},
|
||||
Modal: {
|
||||
okText: 'ตกลง',
|
||||
cancelText: 'ยกเลิก',
|
||||
justOkText: 'ตกลง',
|
||||
},
|
||||
Popconfirm: {
|
||||
okText: 'ตกลง',
|
||||
cancelText: 'ยกเลิก',
|
||||
},
|
||||
Transfer: {
|
||||
notFoundContent: 'ไม่พบข้อมูล',
|
||||
searchPlaceholder: 'ค้นหา',
|
||||
itemUnit: 'ชิ้น',
|
||||
itemsUnit: 'ชิ้น',
|
||||
},
|
||||
Select: {
|
||||
notFoundContent: 'ไม่พบข้อมูล',
|
||||
},
|
||||
Upload: {
|
||||
uploading: 'กำลังอัปโหลด...',
|
||||
removeFile: 'ลบไฟล์',
|
||||
uploadError: 'เกิดข้อผิดพลาดในการอัปโหลด',
|
||||
previewFile: 'ดูตัวอย่างไฟล์',
|
||||
},
|
||||
};
|
5
components/time-picker/locale/th_TH.tsx
Normal file
5
components/time-picker/locale/th_TH.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
const locale = {
|
||||
placeholder: 'เลือกเวลา',
|
||||
};
|
||||
|
||||
export default locale;
|
@ -51,6 +51,7 @@ Supported languages:
|
||||
|Swedish|sv_SE|
|
||||
|Turkish|tr_TR|
|
||||
|Vietnamese|vi_VN|
|
||||
|Thai|th_TH|
|
||||
|
||||
See usage and contributing way of a new locale package at [LocaleProvider](/components/locale-provider).
|
||||
|
||||
|
@ -49,6 +49,7 @@ return (
|
||||
|瑞典语|sv_SE|
|
||||
|土耳其语|tr_TR|
|
||||
|越南语|vi_VN|
|
||||
|泰国语言|th_TH|
|
||||
|
||||
具体的使用方法和新语言包贡献方式请参考 [LocaleProvider 文档](/components/locale-provider)。
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user