Skip to content

Commit

Permalink
update doc and example
Browse files Browse the repository at this point in the history
  • Loading branch information
roys-qlog-co committed Sep 18, 2023
1 parent 7dad4a9 commit ceb1b87
Show file tree
Hide file tree
Showing 3 changed files with 10 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` 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` 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
6 changes: 6 additions & 0 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ import {
tr,
zh,
zhTW,
cs,
el,
ru,
} from 'react-native-paper-dates'
import { useCallback, useState } from 'react'

Expand All @@ -69,6 +72,9 @@ const locales: [string, TranslationsType][] = [
['tr', tr],
['zh', zh],
['zh-TW', zhTW],
['cs', cs],
['el', el],
['ru', ru],
]

locales.forEach((locale) => {
Expand Down
3 changes: 3 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ export { default as pt } from './translations/pt'
export { default as tr } from './translations/tr'
export { default as zh } from './translations/zh'
export { default as zhTW } from './translations/zhTW'
export { default as cs } from './translations/cs'
export { default as el } from './translations/el'
export { default as ru } from './translations/ru'

0 comments on commit ceb1b87

Please sign in to comment.