Skip to content

Commit

Permalink
Merge pull request #397 from CartoonToYou/master
Browse files Browse the repository at this point in the history
Add thai(th) translation
  • Loading branch information
iM-GeeKy authored Jul 5, 2024
2 parents ce9d1ba + 436e501 commit e340623
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docusaurus/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ npm install react-native-paper-dates --save

### Supported

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`.
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`.

```javascript
import { enGB, registerTranslation } from 'react-native-paper-dates'
Expand Down
2 changes: 2 additions & 0 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import {
ro,
id,
ja,
th,
} from 'react-native-paper-dates'
import { useCallback, useState } from 'react'

Expand Down Expand Up @@ -83,6 +84,7 @@ const locales: [string, TranslationsType][] = [
['ro', ro],
['id', id],
['ja', ja],
['th', th],
]

locales.forEach((locale) => {
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ export { default as ru } from './translations/ru'
export { default as ro } from './translations/ro'
export { default as id } from './translations/id'
export { default as ja } from './translations/ja'
export { default as th } from './translations/th'
23 changes: 23 additions & 0 deletions src/translations/th.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { TranslationsType } from './utils'

const th: TranslationsType = {
save: 'บันทึก',
selectSingle: 'เลือกวันที่',
selectMultiple: 'เลือกวันที่',
selectRange: 'เลือกช่วงวันที่',
notAccordingToDateFormat: (inputFormat) =>
`รูปแบบวันที่จะต้องเป็น ${inputFormat}`,
mustBeHigherThan: (date) => `ต้องอยู่ภายหลังวันที่ ${date}`,
mustBeLowerThan: (date) => `ต้องอยู่ก่อนวันที่ ${date}`,
mustBeBetween: (startDate, endDate) =>
`ต้องอยู่ในช่วงวันที่ ${startDate} - ${endDate}`,
dateIsDisabled: 'ไม่สามารถใช้วันที่นี้ได้',
previous: 'ก่อนหน้า',
next: 'ถัดไป',
typeInDate: 'พิมพ์วันที่',
pickDateFromCalendar: 'เลือกวันที่จากปฏิทิน',
close: 'ปิด',
minute: 'นาที',
hour: 'ชั่วโมง',
}
export default th

0 comments on commit e340623

Please sign in to comment.