Skip to content

Commit e340623

Browse files
authored
Merge pull request #397 from CartoonToYou/master
Add thai(th) translation
2 parents ce9d1ba + 436e501 commit e340623

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

docusaurus/docs/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ npm install react-native-paper-dates --save
3636

3737
### Supported
3838

39-
React-Native-Paper-Dates currently supports `ar/ca/de/en/en-GB/es/fr/he/hi/it/ko/nl/pl/pt/tr/zh/zh-TW/cs/el/ru/ro/id/ja` translations. Ideally you would do this somewhere before react-native-paper-dates is used. For example, you might add the follow to your `index.js` or `app.js`.
39+
React-Native-Paper-Dates currently supports `ar/ca/de/en/en-GB/es/fr/he/hi/it/ko/nl/pl/pt/tr/zh/zh-TW/cs/el/ru/ro/id/ja/th` translations. Ideally you would do this somewhere before react-native-paper-dates is used. For example, you might add the follow to your `index.js` or `app.js`.
4040

4141
```javascript
4242
import { enGB, registerTranslation } from 'react-native-paper-dates'

example/src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import {
5555
ro,
5656
id,
5757
ja,
58+
th,
5859
} from 'react-native-paper-dates'
5960
import { useCallback, useState } from 'react'
6061

@@ -83,6 +84,7 @@ const locales: [string, TranslationsType][] = [
8384
['ro', ro],
8485
['id', id],
8586
['ja', ja],
87+
['th', th],
8688
]
8789

8890
locales.forEach((locale) => {

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ export { default as ru } from './translations/ru'
3131
export { default as ro } from './translations/ro'
3232
export { default as id } from './translations/id'
3333
export { default as ja } from './translations/ja'
34+
export { default as th } from './translations/th'

src/translations/th.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type { TranslationsType } from './utils'
2+
3+
const th: TranslationsType = {
4+
save: 'บันทึก',
5+
selectSingle: 'เลือกวันที่',
6+
selectMultiple: 'เลือกวันที่',
7+
selectRange: 'เลือกช่วงวันที่',
8+
notAccordingToDateFormat: (inputFormat) =>
9+
`รูปแบบวันที่จะต้องเป็น ${inputFormat}`,
10+
mustBeHigherThan: (date) => `ต้องอยู่ภายหลังวันที่ ${date}`,
11+
mustBeLowerThan: (date) => `ต้องอยู่ก่อนวันที่ ${date}`,
12+
mustBeBetween: (startDate, endDate) =>
13+
`ต้องอยู่ในช่วงวันที่ ${startDate} - ${endDate}`,
14+
dateIsDisabled: 'ไม่สามารถใช้วันที่นี้ได้',
15+
previous: 'ก่อนหน้า',
16+
next: 'ถัดไป',
17+
typeInDate: 'พิมพ์วันที่',
18+
pickDateFromCalendar: 'เลือกวันที่จากปฏิทิน',
19+
close: 'ปิด',
20+
minute: 'นาที',
21+
hour: 'ชั่วโมง',
22+
}
23+
export default th

0 commit comments

Comments
 (0)