eui icon indicating copy to clipboard operation
eui copied to clipboard

Translate all Components

Open firminoeducbank opened this issue 3 years ago • 1 comments
trafficstars

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? image

firminoeducbank avatar Jul 31 '22 08:07 firminoeducbank

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):

Screenshot 2022-08-01 at 14 42 33

Let me know if that helps.

elizabetdev avatar Aug 01 '22 13:08 elizabetdev

👋 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.

github-actions[bot] avatar Oct 01 '22 16:10 github-actions[bot]