Hello,
I wanted to know if there is a way to set the multilanguage on Android
Thanks!!
How to set up multiple languages on Android
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: How to set up multiple languages on Android
If your question is can you code your app to support multiple languages, then yes, if you code it as such.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: How to set up multiple languages on Android
Ok, so is there nothing already made ? I have to make the folder res/values/strings.xml and handle by myself ?
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: How to set up multiple languages on Android
I think there might be a misconception here, or we're talking about two different things.
Löve works the same on all platforms it supports, Android and iOS included; you have your data in the .love file, which is a renamed zip, and for android, you build an application with that included with the löve app so it runs your own project (or, for development purposes, you just download the plain löve app, and there's a single folder where you can put your code and resources to develop/test).
I found the below link, and i don't think that's needed for whatever you want to accomplish; multi-language support with löve can work in a myriad ways.
http://android.tutorialhorizon.com/what-is-strings-xml/
For example, here's a lib one could use:
https://github.com/kikito/i18n.lua
Löve works the same on all platforms it supports, Android and iOS included; you have your data in the .love file, which is a renamed zip, and for android, you build an application with that included with the löve app so it runs your own project (or, for development purposes, you just download the plain löve app, and there's a single folder where you can put your code and resources to develop/test).
I found the below link, and i don't think that's needed for whatever you want to accomplish; multi-language support with löve can work in a myriad ways.
http://android.tutorialhorizon.com/what-is-strings-xml/
For example, here's a lib one could use:
https://github.com/kikito/i18n.lua
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: How to set up multiple languages on Android
You can do something as simple as
Where the dialogue file returns a Lua table with relevant entries.
Code: Select all
selected_language = "EN"
text = require ( "text/" .. selected_language .. "/dialogue123.lua" )
love.graphics.print ( text.greeting, 100, 100 )
Re: How to set up multiple languages on Android
Thanks everyone, i was wondaring that if i wouldnt use the "android way" to handle multi language my app wouldnt be recognized properly multi language by the play store
Re: How to set up multiple languages on Android
I believe using ffi or digging into the Java code you could implement a function that returns the phone locale and translate based on that.
Either way there's no such built-in function as far as I know, I might be wrong though.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Semrush [Bot] and 2 guests