eui
eui copied to clipboard
Translate all Components
Hi folks
How can I translate all components in ElasticUi?
I need a translate all items for pt-Br, have only locally to translate these components?
If yes, can you provide an example?

Hi @firminoeducbank,
You can find the component tokens you want to translate here: https://elastic.github.io/eui/#/package/i18n-tokens.
Then you can use EuiContext:
EuiContext allows setting global internationalization copy for EUI components. Any components used within this context will lookup their display values from this mapping.
Here's an example where I'm translating "Columns" and "Sort fields" to Portuguese (https://codesandbox.io/s/sparkling-grass-nznvdv?file=/demo.js):
Let me know if that helps.
👋 This issue hasn't seen activity in 3 days, so we're automatically closing this issue as answered. Please leave a comment if that's not the case, or if you have any remaining questions or issues.