Javier Diaz
Javier Diaz

Reputation: 1830

How to get the phone language with libgdx?

I'm tyring to set a default language for my game and I would like it to be the phone's language, the question is: how can I get the phone's language?

Upvotes: 5

Views: 2159

Answers (1)

donfuxx
donfuxx

Reputation: 11321

In my last game I used the default locale of the JVM:

java.util.Locale.getDefault().toString();

to get the device language. That seemed to work fine for Android as well.

Upvotes: 13

Related Questions