How to set default locale for all component without using i18 provider
i don't want to change locale dynamically, only need one
5 Replies
flat-fuchsia•2y ago
e.g there is refresh btn in edit page header. i need to change 'refresh' text
basically all translation for buttons
deep-jade•2y ago
Hey @artemichi, its not required to use a fully featured package to use
i18nProvider
. You can just create a basic implementation and use translate
function to check the keys and values and return the values you want. You can return the same key (first argument of the function) if you want to skip the translation; it will fallback to the default translation.
Here's the https://refine.dev/docs/api-reference/core/providers/i18n-provider/#creating-i18n-provider documentation for i18n providers, you can check the types and the implementation; but you don't need to implement multiple languages or anything complicated to achieve your use case.
Hope this helps 🙏i18n Provider | refine
refine is capable of supporting any i18n framework but a i18nProvider according to the relevant library must be created.
flat-fuchsia•2y ago
![No description](https://cdn.answeroverflow.com/1042388384313770045/image.png)
flat-fuchsia•2y ago
i think i got it
i need to map key to translation
and thats it
deep-jade•2y ago
Yes, that should be it 😅