Android language
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Android language
hello i'm on löve for android and i'm trying to get the default OS language i know os.getenv () can do it but i do not know the name of the environment variable containing the language
Re: Android language
You can use locale shell command, but no guarantees. It's ok, don't use it, just ask user about preferred language at first launch. It's better way, srsly.
Science and violence
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: Android language
Looking up online it looks like CoronaSDK approaches this problem by having a preferences method in their system module. Maybe Love should have the same thing?
Re: Android language
thank you for the answer I will ask the user at launch
bobbyjones: i have been looking at löve references for a few times but he seems to have nothing
bobbyjones: i have been looking at löve references for a few times but he seems to have nothing
Re: Android language
The relevant environment variable names are "LANG" and "LC_ALL". These are from UNIX specifications. Android uses Linux kernel which isn't UNIX, but is UNIX-like and supports these variables. Apple OSes are straight UNIX.
The to-go way of handling multiple languages is to simply have a language selector in menu.
The to-go way of handling multiple languages is to simply have a language selector in menu.
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: Android language
Do LANG and LC_ALL work on android? I read that it does not work. I believe the only way to access the Locale and language is through JNI.
Re: Android language
I confirm LANG and LC_ALL do not work.How can I use JNI?
Who is online
Users browsing this forum: Ahrefs [Bot] and 4 guests