Skip to main content

How do i detect user language.

  • August 24, 2023
  • 6 replies
  • 49 views

Forum|alt.badge.img+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

Mettin
Mironeer
Forum|alt.badge.img+1
  • Mironeer
  • 90 replies
  • August 25, 2023

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


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 4 replies
  • August 25, 2023

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.


Mettin
Mironeer
Forum|alt.badge.img+1
  • Mironeer
  • 90 replies
  • August 25, 2023

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

 

Thanks @li.nan 

 


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 4 replies
  • August 25, 2023

@Mettin yes, please.

Thank you very much!


Mettin
Mironeer
Forum|alt.badge.img+1
  • Mironeer
  • 90 replies
  • August 25, 2023

@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!


Forum|alt.badge.img+1
  • Author
  • Beginner
  • 4 replies
  • August 25, 2023

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

Thanks again!