Skip to content

Commit 1293fbb

Browse files
Merge pull request #318 from SoyDiego/added-translations-app
Added ES and IT translations missing in APP
2 parents 2b604e9 + ebc8bf7 commit 1293fbb

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

docusaurus/docs/intro.md

Lines changed: 2 additions & 2 deletions
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 `en/nl/de/pl/pt/ar/ko/fr/he/hi/tr/enGB/zh/zh-TW` 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/de/en/en-GB/es/fr/he/hi/it/ko/nl/pl/pt/tr/zh/zh-TW` 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'
@@ -71,7 +71,7 @@ registerTranslation('pl', {
7171

7272
:::info Note
7373

74-
If a language is not supported. Consider creating a pull request so that it can officially be supported.
74+
If a language is not supported, consider creating a pull request so that it can officially be supported.
7575

7676
:::
7777

example/src/App.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,42 @@ import {
2828
DatePickerModal,
2929
TimePickerModal,
3030
DatePickerInput,
31+
registerTranslation,
32+
TranslationsType,
3133
ar,
3234
de,
3335
en,
3436
enGB,
37+
es,
3538
fr,
3639
he,
3740
hi,
41+
it,
3842
ko,
3943
nl,
4044
pl,
4145
pt,
42-
registerTranslation,
4346
tr,
44-
TranslationsType,
4547
zh,
4648
zhTW,
4749
} from 'react-native-paper-dates'
4850
import { useCallback, useState } from 'react'
4951

5052
const locales: [string, TranslationsType][] = [
51-
['en', en],
52-
['nl', nl],
53-
['de', de],
54-
['pl', pl],
55-
['pt', pt],
5653
['ar', ar],
57-
['ko', ko],
54+
['de', de],
55+
['en', en],
56+
['en-GB', enGB],
57+
['es', es],
5858
['fr', fr],
5959
['he', he],
6060
['hi', hi],
61+
['it', it],
62+
['ko', ko],
63+
['nl', nl],
64+
['pl', pl],
65+
['pt', pt],
6166
['tr', tr],
62-
['en-GB', enGB],
6367
['zh', zh],
6468
['zh-TW', zhTW],
6569
]

0 commit comments

Comments
 (0)