Is it possible to change the app language using a library without any different language string resource file in Android? The library should automatically change the UI texts.
Asked
Active
Viewed 88 times
-2
-
2Welcome to the StackOverflow community! Its always good to share what we have tried and what all things we have found before asking question here. – Paresh Mayani Aug 21 '19 at 07:50
-
@PareshMayani I know if I change app language we need that language string resource file if it's every unique string we want to translate each language it is too long work. The question I want to create change language without string resources file using a library? – Azarudeen e-Orchids Aug 21 '19 at 08:26
-
You want to translate your app to every single language spoken in the world...? – Fustigador Aug 21 '19 at 09:04
-
1yes, it is possible, but you likely will have to create such a library. – Vladyslav Matviienko Aug 21 '19 at 09:57
1 Answers
0
To change the language throughout the application you need a different string files If you mean programatically you can check here otherwise better to see this Google documentation for best practices. And also If you are looking for an easy way of changing the language you can use this library.

Sabri Meviş
- 2,231
- 1
- 32
- 38
-
Thank you a lot for your fast response and great support. the above all references are using different string files. I repeat we need to change language without different string files if possible are not. if it's possible please let me now – Azarudeen e-Orchids Aug 21 '19 at 08:51
-
1I don't think it is possible...all the Strings in an Android app should be in the strings.xml files. If they are not there, even if you manage to get the Strings you want to translate (maybe parsing the files and looking for everything inside ' " ' characters, and calling a REST API to get the translation) I doubt there is any library to do that. Also, it would be very VERY error prone. I strongly advise you to stick to the resource file mechanism. – Fustigador Aug 21 '19 at 08:57