This function returns a different value depending on the browser or device language region.



Returns: String


This function returns a string with the two or three letter Regional Code for the OS that is running the game, as set by the ISO3166-1 standard. If the information is not available, it will hold simply an empty string "".

NOTE: This is not the location regional code that is returned, but the regional language code of the OS.


switch (os_get_language())
   case "zh":
      var region = os_get_region();
      if (region == "HK" || region == "MO" || region == "TW")
   case "fr":
   case "it":

The above code checks the OS language and if it is Chinese, it then checks the OS region, opening a different *.ini file depending on the returned values.

Back: Operating Systems
Next: os_get_info
© Copyright YoYo Games Ltd. 2018 All Rights Reserved