Home > Mobile > Mobile home screen, under the icon of the APP name, how to change language on the phone, can display
Mobile home screen, under the icon of the APP name, how to change language on the phone, can display
Time:09-26
After we develop android APP, installed on a mobile phone, generally on the Home Screen, the APP icon below, shows the Chinese name of the APP,
The question now is, if the phone set language to English or other than Chinese, how to realize, in the name of the APP icon at the bottom of the APP, automatic adaptation, shown as the name of the corresponding language? Or, in the Chinese language environment, all in general, according to the English name of the APP,
In AndroidManifest. In the XML file, the current application or primary activity of android: label, are="@ string/app_name".
Thank you very much!
CodePudding user response:
Values strings in the directory. The XML defined in general is in Chinese, for example, if you want the phone language is displayed when English characters, you will need to create a new values - en folder, a copy of it also strings. XML, such as the inside of the values srings. XML definition app_name is hello inside, so the inside of the values - en strings. The XML to define inside, app_name is hi, similar to other language, the android system provides multilingual support,
CodePudding user response:
To add multilingual support system detects the current locale automatically adjust, like this: MyProject/ Res/ Values/ XML strings. Values - es/ XML strings. Values - fr/ XML strings.