There was a friend in the group this morning asking how to set the name of the Android app for Qt development to Chinese and tried it out in two ways.
Post Contest Finals, please vote for me: Qt Quick image processing examples of beauty 美图秀秀 (with source download), thank you.
Original link: Qt Quick image processing examples of beauty 美图秀秀 (with source download)
Modify the Androidmanifest.xml file directly
First you need to create a androidmanifest.xml file when you create a Qt on Android project. If you don't know how to create it, refer to my article, "Qt on Android: The whole process of text-to-detail Hello world."
Open the Androidmanifest.xml file in Qt Creator, switch to XML source mode, 1:
Figure 1 Modifying Androidmanifest to implement Chinese application name
Also modify application and activity two tabs, save, Run, OK.
The app on the phone is shown in Listing 2:
Figure 2 List of mobile apps
See, the upper left corner, the "Chinese application" that.
Add Chinese string file
The first approach, in fact, is more violent and undermines the internationalization framework offered by Android. The second method is recommended.
The first thing to do is to create a androidmanifest.xml file, not to mention.
Then open the project directory, locate the Android subdirectory, build the path RES/VALUES/VALUES-ZH-RCN, create a new strings.xml below, and make sure it is the Utf-8 file encoding format. The file content resembles the following:
<?xml version= ' 1.0 ' encoding= ' utf-8 '?><resources> <string name= ' app_name ' > Chinese app </string > <string name= "ministro_not_found_msg" > Unable to find Ministro service. \ n the application cannot start. </string> <string name= "Ministro_needed_msg" > This application requires Ministro service. Do you want to install it? </string> <string name= "Fatal_error_msg" > Your application encountered a fatal error that prevented it from continuing. </string></resources>
Finally, run your Android project and you can see the same effect as the method.
The final of the post contest, please vote for me: Qt Quick Image processing examples of beauty 美图秀秀 (attached source download), thank you. Other articles on the Qt on Android series are here:
- Qt on Android: text-to-detail Hello world whole process
- Introduction to the development of Qt 5.2 for Android under Windows
- Qt for Android deployment process Analysis
- QT on Android: output qt Debug information to Logcat
- Qt on ANDROID:QT 5.3.0 released for Android improvement instructions
- Qt on Android episode 1 (translation)
- Qt on Android episode 2 (translation)
- Qt on Android episode 3 (translation)
- Qt on Android episode 4 (translation)
- Qt for Android compiled pure C project
- Windows under Qt for Android compiled Android C language executable program
- Qt on Android:android SDK installation
- Qt on android:http download and JSON parsing
Qt on Android Settings app is named Chinese