-2

I would like to add support to different languages in my app. As I understand, Android uses the proper strings.xml file according to the operation languages of the device. But what If I want to allow users to change the language in the settings? What steps should I do? I thought of keeping the the user's language in the his document (Firebase cloud) but then if the user if logs out the app, the main page (login/sign up) will be in the default language (and not in his language).

I guess that there is a proper "flow" that I need to follow in order to add support to multi languages. Is it possible to share this flow with me?

vesii
  • 2,760
  • 4
  • 25
  • 71
  • [Localization](https://github.com/akexorcist/Localization) will help you. on signout clear language preference or set default language preference. – Tushar Lathiya Jul 24 '20 at 12:22
  • I don't think this is a good idea. Just using the system language settings makes it much easier for both the users and the developers. – Henry Jul 24 '20 at 12:25

1 Answers1

0

you can go to res- values, then from the right click list create a new Values Resource File

from the window appears name the files strings and then select locale and add your language or country.. picture below to make it clear for you

enter image description here

then after that you can change the locale programmatically using these methods and let android system do the rest of work

Ezaldeen sahb
  • 719
  • 7
  • 12