Unity 3D Game Engine – Get OS Language

Inside Hierarchy create a scene with:

1. Main Camera

2. GUI Text, attach the script ‘GetLanguage.js’

GetLanguage.js


#pragma strict

function Start () {
	// Prints to a guiText the actual language that the system is using.
	guiText.text = Application.systemLanguage.ToString();
}

function Update () {

}

NOTICE ToString(); function that converts value to string.

The final result is: Italian