How to use libgdx to obtain mobile phone language?
•
Java
I am setting the default language of my game. I hope it is the language of my mobile phone. The question is: how can I get the language of my mobile phone?
Solution
In my last game, I used the JVM's default locale:
java.util.Locale.getDefault().toString();
Gets the device language This also seems to apply to Android
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码