Skip to content

How can i manage the idiom and notation inside wave components? #2287

Answered by marek-mihok
junioraze asked this question in Q&A

You must be logged in to vote

@junioraze when I run your code, I have the output you expect:

The reason why it is showing mi/mil instead of K,M,B is the language of your browser. Our plot implementation uses navigator.language prop for localisation of number format which usually uses language of the browser.

This is what happens when I override the browser default with pt-BR locale:

Screen.Recording.2024-03-21.at.12.16.38.mov

@mturoci wouldn't make sense to prioritise the language of the website by obtaining html lang prop here? Something like this?

export const intl = createIntl({
  locale: document.documentElement.getAttribute("lang") || navigator.language,

Replies: 6 comments 3 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
1 reply
@junioraze

You must be logged in to vote
1 reply
@junioraze

Answer selected by junioraze

You must be logged in to vote
0 replies

You must be logged in to vote
1 reply
@mturoci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants