androidlocalizationmarmalade

How to localize Android app name in Marmalade SDK


I am developing an app for Android using Marmalade 8.2 and I want to have a translation of my app's name in different languages.

I know that I can change the app's name in the deployment options of the MKB file:

name = "My Name"
caption = "My Name"

So one way to do it would be to create different deployments (one for each language), but then I would end up with several different APKs.

Another way would be to use the: android-extra-strings deployment option as something like this:

android-extra-strings='(app_name,My App Name)'

But once again I would have to create different deployments for different languages.

Is there a way to specify different strings.xml files in Marmalade or to have localized strings in the same deployment?

UPDATE

I've done some more reasearch and I discovered that I can add extra strings.xml files to my apk package. Each of these files can have a localized app name.

To do this I've added the following step to my configuration: android-external-res = "android_res", unfortunately the folders with the strings.xml are not being copied into the apk. I am doing something wrong?


Solution

  • I've done some more testing and the android-external-res = "android_res" variable in the MKB file works fine as long as you have the correct folder structure with the values-xx folders (xx would be the language code such as en or pt) and the strings.xml files inside them.

    Note: even though he package is built with these files and they work, you will not seem them in the "intermediate-files" folder of your build, so you can end up thinking that they are being disregarded.