Docs
Localization New
Every string the library renders, from button hints to countdown units, comes from labels. Complete label packs ship for Polish, Spanish, German and Arabic: pass one as labels, or spread it to change single strings. For any other language, pass a locale and only the labels you translate. The rest stay in English. Icons and the back chevron mirror in right-to-left layouts.
import { NativeUIProvider, plLabels } from '@polprog/native-ui';
<NativeUIProvider
config={{
locale: 'pl-PL',
labels: { ...plLabels, confirm: 'Gotowe' },
}}
>
<Root />
</NativeUIProvider>
Key points
- Every string the library renders comes from labels.
- Complete packs: plLabels, esLabels, deLabels and arLabels.
- Spread a pack to change single strings and keep the rest.
- Icons and the back chevron mirror in right-to-left layouts.