mirror of
https://github.com/zhigang1992/react-native-chat-ui.git
synced 2026-01-12 22:50:15 +08:00
14 lines
661 B
Markdown
14 lines
661 B
Markdown
---
|
|
id: localization
|
|
title: Localization
|
|
---
|
|
|
|
You can pass the `locale` prop to the `<Chat />` component. This locale will be passed to [dayjs](https://day.js.org), so we can localize dates. To see all supported locales check function `initLocale` in [this file](https://github.com/flyerhq/react-native-chat-ui/blob/main/src/utils/index.ts). Additionally, `locale` prop will be used to localize a couple of texts defined [here](https://github.com/flyerhq/react-native-chat-ui/blob/main/src/l10n.ts). You can override texts regardless of the locale by passing `l10nOverride` prop.
|
|
|
|
```ts
|
|
<Chat
|
|
l10nOverride={{ inputPlaceholder: 'Here' }}
|
|
locale='en'
|
|
/>
|
|
```
|