Overriding App icon string for Android builds
There's lots of Obsolete information regarding how you can override unity's default android:label="@string/app_name" for different translations.
Can someone provide me with a method (even basic steps) of what is needed to override this?
Android\res doesn't work (Obsolete)
Minimal Android\LocalizedName project doesn't work (it's included just ignored)
Anyone achieved this (without using the compiled plugin on the store?)
Answer by roberto-ardila · Feb 10, 2017 at 05:04 PM
Hello,
You can override the default android:label="@string/app_name" for different languages this way: (tested on Unity 5.5.1p2)
Unity creates a strings.xml file by default which contains the Product Name that you set in the Unity Editor in Player Settings > Product Name That string you mention is found in that strings.xml resource file (which is found in the res/values/ folder in the generated Android project).
To add support for more locales, you must create additional directories inside res/ each directory's name should adhere to the following format:
resource type-b+language code+country code
For example, the folder values-b+es contains string resources for locales with the language code es (Spanish), inside each folder will go a strings.xml file with the texts on each language.
You can add the new locales inside your Unity project creating the following directory structure:
Assets
-> Plugins
-> Android
->res
->values-b+en
->strings.xml (with your text in english)
->values-b+es
->strings.xml (with your text in spanish)
->values-b+fr
->strings.xml (with your text in french)
...
...
...
I attached a basic Android Unity project as an example, also you can find more info on localization on Android here: https://developer.android.com/training/basics/supporting-devices/languages.html
Regards,
Roberto
Is this format for "res/values" folder publicly documented any where?
Your answer
Follow this Question
Related Questions
Problem Building game on Android smartphone- Black screen and back to menu android. 0 Answers
Monetization breaks iOS build in XCode. Also breaks Android build. 1 Answer
Ads aren't showing in my builds/showing placeholder 0 Answers
getting stuck at build with Il2cpp.exe, crashing everytime 0 Answers
CommandInvokationFailure: Failed to re-package resources. 0 Answers