I18n locale change doesn't change column headerName
On selecting different locale via I18n provider, everything translates instantly except column all of headerNames on open list.tsx, those translate only on page refresh.
3 Replies
Hi @beg1c. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the information provided in the extracts, it seems like you are using the
useTranslate
hook from Refine to translate your column headers. This hook should automatically re-render your component when the locale changes.
Here is an example of how you might use it in your List
component:
(Source: Refine Documentation (https://refine.dev/docs/guides-concepts/i18n#changing-the-locale))
If your column headers are not updating when the locale changes, it might be because your List
component is not re-rendering. Make sure that your List
component is a child of your Refine
component, and that you are passing your i18nProvider
to the Refine
component:
(Source: Refine Documentation (https://refine.dev/docs/guides-concepts/i18n#changing-the-locale))
If you are still having issues, it might be helpful to check the Refine Documentation (https://refine.dev/docs) or the Refine Blog (https://refine.dev/blog) for more information.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@537772056847187988> kapa.ai is still learning and improving, please let us know how it did by reacting below
absent-sapphire•7mo ago
Hello @Slemming, can you provide reproducible example for us to debug, please?