Search Unity

How to detect the language variant of a particular country? [SOLVED]

Discussion in 'Scripting' started by Cris_2013, May 12, 2020.

  1. Cris_2013

    Cris_2013

    Joined:
    Nov 25, 2017
    Posts:
    39
    Hi there,

    I believe I can use Application.systemLanguage to know what is the current language set in the OS, however it doesn't discriminate between variants like American English (en_us) or British English (en_gb), or Castilian Spanish (es) and Mexican Spanish (es_mx).

    Is there any way to know the code of the current language in the OS, like it is used on the web:
    https://www.andiamo.co.uk/resources/iso-language-codes/

    Many thanks in advance.
     
  2. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    2,836
  3. Cris_2013

    Cris_2013

    Joined:
    Nov 25, 2017
    Posts:
    39
    Awesome, thanks a lot!