Skip to content

Commit

Permalink
Merge pull request #318 from SoyDiego/added-translations-app
Browse files Browse the repository at this point in the history
Added ES and IT translations missing in APP
  • Loading branch information
RichardLindhout authored Aug 31, 2023
2 parents 2b604e9 + ebc8bf7 commit 1293fbb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions 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 `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`.
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`.

```javascript
import { enGB, registerTranslation } from 'react-native-paper-dates'
Expand Down Expand Up @@ -71,7 +71,7 @@ registerTranslation('pl', {

:::info Note

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

:::

Expand Down
22 changes: 13 additions & 9 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,38 +28,42 @@ import {
DatePickerModal,
TimePickerModal,
DatePickerInput,
registerTranslation,
TranslationsType,
ar,
de,
en,
enGB,
es,
fr,
he,
hi,
it,
ko,
nl,
pl,
pt,
registerTranslation,
tr,
TranslationsType,
zh,
zhTW,
} from 'react-native-paper-dates'
import { useCallback, useState } from 'react'

const locales: [string, TranslationsType][] = [
['en', en],
['nl', nl],
['de', de],
['pl', pl],
['pt', pt],
['ar', ar],
['ko', ko],
['de', de],
['en', en],
['en-GB', enGB],
['es', es],
['fr', fr],
['he', he],
['hi', hi],
['it', it],
['ko', ko],
['nl', nl],
['pl', pl],
['pt', pt],
['tr', tr],
['en-GB', enGB],
['zh', zh],
['zh-TW', zhTW],
]
Expand Down

0 comments on commit 1293fbb

Please sign in to comment.