我有一个if else语句,将语言Capability IN更改为ENGLISH。
问题在于它覆盖了其他功能。
txtbox1.text = Capabilities.version + "\n"
+ "\n" +Capabilities.isDebugger + "\n" +Capabilities.os
+ "\n" +Capabilities.playerType
if(Capabilities.language == "en"){
txtbox1.text = "language: English";
}
else if (Capabilities.language.toLowerCase() == "sv"){
txtbox1.text = "language: swedish";
}
else {
txtbox1.text = "language: Other";
}
;
感谢。
答案 0 :(得分:1)
var language : String = "";
if(Capabilities.language.toLowerCase() == "en")
language = "language: English";
else if (Capabilities.language.toLowerCase() == "sv")
language = "language: swedish";
else
language = "language: Other";
txtbox1.text = Capabilities.version
+ "\n" + Capabilities.isDebugger
+ "\n" + Capabilities.os
+ "\n" + Capabilities.playerType
+ "\n" + language;