Get the OS language ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ZacB

How do I get the OS (i.e. Android) language ?

:bust_in_silhouette: Reply From: Diet Estus

You would use OS.get_name(). See here.

Sry my question wasn’t precise. I asked for the languages like english french spanish etc…

ZacB | 2018-08-25 18:49

:bust_in_silhouette: Reply From: eons

OS.get_locale() may be what you are looking for.

Thx it worked !
I don’t know why it’s called like that btw :confused:

ZacB | 2018-08-26 06:26

It’s called “locale” because it refers to a set of region-specific parameters; see the Wikipedia page on locales.

Calinou | 2018-08-26 10:39

:bust_in_silhouette: Reply From: Luciano Simoni


is going to return the general language, en instead of en-GB or en-US.

If you want to be region-specific, just use the OS.get_locale().

Godot 3.5