Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ZacB |
How do I get the OS (i.e. Android) language ?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ZacB |
How do I get the OS (i.e. Android) language ?
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
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
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
Reply From: | Luciano Simoni |
OS.get_locale_language()
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