My language translation are not working in debug build, However It works fine in release build, I checked and got a workaround to set the language dynamically inside activity
class, but I don't want to do this since it work fine in the release build, there should be a good remedy instead of applying a hack or unwanted code, In my app there is an network api call at beginning that returns language needed to be set to the app, this works good in release build, but in debug
build the translation are working for only main
module, but no translation works for the activity that are present in other module.
any help will be appreciated.
Asked
Active
Viewed 552 times
1
1 Answers
0
I believe there is an app on the market called moreLocales 2. I use for this purpose.
If you install it, you can switch the localization of your device and it should work for you as it works for me, and I hit the same issue. If you are just relying on changing your settings in the phone and not rebooting or going through the startup flow, it may be caching. That's my best assumption as to why it doesn't obey the phone settings without this extra app installed.
But this is just for development and testing as the release version should work fine. You can also test it in the preview on Android Studio by picking your language.

Sam
- 5,342
- 1
- 23
- 39
-
this is not what I'm looking for, I have to show and share the debug build to my peers, I need a real fix not any hack, this is a build related issue works fine on `release` build, I'm facing this in only `debug` build, anyways thanks for your effort, appreciated – HAXM Oct 24 '18 at 17:13
-
Are you saying that you have someone who's phone is "Naturally" set to Spanish (for example) but when they install your debug build on their phone it is still showing English? I only ask because if they normally have their phone in English, then they may be in the same boat. Trying to switch languages without restarting the phone. – Sam Oct 24 '18 at 18:46
-
There is a api call at beginning that give which language needed to be set to the app, through that the language is set to the app. – HAXM Oct 25 '18 at 02:05
-
Ahh ok, that is different then. Are you signing with Google's new signing process? If so, I'm guessing the extra languages are not packaged into the debug build because they are not considered necessary for your development. So you may have to figure out how to package all the language strings into the build. Have you tried opening the APK with a tool and checking the content to see if the other language strings are in there? – Sam Oct 26 '18 at 12:31