How do i detect user language.

  • 24 August 2023
  • 6 replies
  • 25 views

Badge +1

Hi, I’d like to use current user language to initialize my app. Is there any api that i can use to do this?

Thanks!


6 replies

Userlevel 3
Badge +1

Hey @li.nan, good one!

We don’t expose language at the moment. If you are (also) using the SDK you can use the navigator object to detect it

Can I ask what your use case is?

Cheers,
Mettin

Badge +1

Hi @Mettin , thanks for the reply!

Well, navigator is not always so reliable. Especially to those who usually need to deal with multiple language. For me, i’m in china, but i’m using miro with japanese UI setting. So, I’d like to know if there’s other options.

Can I ask what your use case is?

Of course. I’m making an app with multi-language support. I think it’s better to show the UI to them with their preferred language.

Userlevel 3
Badge +1

Sounds reasonable! I will tell the team your use case and ask if they can add this.

 

Thanks @li.nan 

 

Badge +1

@Mettin yes, please.

Thank you very much!

Userlevel 3
Badge +1

@li.nan im sorry, there was a update recently and you CAN get the users selected locale using board.getInfo:

https://developers.miro.com/docs/board_board#getinfo

Enjoy!

Badge +1

@Mettin oh...you just saved my day!

Thanks again!

Reply