Android displays the specified language by default when entering a specified page

Android displays the specified language by default when entering a specified page

I have recently received project requirements. On the basis that the default language of the system is English, when entering a specified page, the page is required to be displayed in Chinese by default. That is, when entering a specified page, the specified language is required to be displayed by default. To achieve the above effect, just need Just replace the strings.xml in the values ​​directory of the system default language in the res directory with the strings.xml in the values ​​directory of the corresponding specified language. Take the project requirements mentioned above as an example to illustrate the specific modification steps:

The requirement of this project is to replace the corresponding English /values/strings.xml file with the corresponding Chinese /values-zh-rCN/strings.xml file in the res directory.

Delete the corresponding directory where the /out/target/product/pj modified page is located and recompile and verify. The modification will take effect. When entering a specified page, the specified language will be displayed by default.

Guess you like

Origin blog.csdn.net/Jeffries_C/article/details/134894342