jwatson Posted April 5 Share Posted April 5 Hello, Is there a way to get the headset language selected from the Focus 3 Lobby in Unity. We're looking mostly at the distinction between Spanish (Latin America) vs Spanish (Spain) since application.SystemLanguage does not show a distinction between the two when selected in application. Thanks! Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted April 8 Share Posted April 8 Hi @jwatson, You can use below code to get the language and country to differentiate between Spanish (Latin America) and Spanish (Spain). string GetSystemLanguage() { AndroidJavaClass lc = new AndroidJavaClass("java/util/Locale"); AndroidJavaObject dl = lc.CallStatic<AndroidJavaObject>("getDefault"); string language = dl.Call<string>("getLanguage"); string country = dl.Call<string>("getCountry"); return language + "-" + country; } For Spanish (Latin America), you will get es-419. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now