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.

CodePudding user response:

reference 1st floor xiaoyu_93 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,

Thank you very much!
So, if I want to, not simplified Chinese or traditional Chinese language situation, to use the value - en strings. The XML, how to do? Thank you very much!

CodePudding user response:

reference xadave reply: 3/f
Quote: refer to 1st floor xiaoyu_93 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. The 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,

Thank you very much!
So, if I want to, not simplified Chinese or traditional Chinese language situation, to use the value - en strings. The XML, how to do? Thank you very much!

That you in turn, the default string in use English name, add a value folders show Chinese name in Chinese, so by default, all show in English

CodePudding user response:

My side after testing the system must be set to English, the app on the desktop display name will be in English,

CodePudding user response:

taro balls reference 5 floor response:
my side after testing the system must be set to English, the app on the desktop display name will be in English,


You put the original string. I started all the text in the XML resource into English, and then to build a values - useful language resources folder, put the string. The XML in the text are copied in the past, and then convert into Chinese

CodePudding user response:

refer to the original poster ZuoXiaoWei general response:
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!


You put the original string. I started all the text in the XML resource into English, and then to build a values - useful language resources folder, put the string. The XML in the text are copied in the past, and then convert into Chinese
  • Related