- Home /
Need help with systemLanguage (JS, Windows)
I'm trying to write a script which detects system language and do some action depending on it. I googled nothing, tried some of variants, currently stucked with this (just example):
static var systemLanguage : SystemLanguage;
function Start () {
if
(Application.systemLanguage.Chinese){
Application.Quit(); }
}
No errors, but it will close with any system language. What is wrong?
Answer by jogo13 · Jan 07, 2013 at 01:53 AM
Your if statement is looking for a bool but systemLanguage is a Enum, try this: (untested)
if(Application.systemLanguage == SystemLanguage.Chinese)
{
//code
}
Answer by sashadarko · Jan 07, 2013 at 07:09 AM
Thought about the same but for some reason thought it wouldn't work. But it worked, thanks!
Your answer
Follow this Question
Related Questions
Language feature not implemented: System 0 Answers
How get system language on IPad? 2 Answers
Accessing local system ( File Browser ) 2 Answers
add more country at "systemlanguage" 1 Answer
How do I get a component of canvas? 0 Answers