Mobile version apktool, 920 text editor, English-Chinese dictionary (not necessary if your English is good enough). 920 text editor, please download the mobile apktool from Baidu!
Start the tutorial:
First open apktool, select the program (apk) you need to localize, click and select "Decompile All", then wait. The length of time depends on the size of the program. After the decompilation is completed, enter the folder generated after decompiling the program. Enter the folder and you will see two folders, the res folder and smali, and two files. Regardless of anything else, enter the res folder. We can see that there are many folders starting with value (some programs have only one) and some folders starting with layout and drawable. Among them, what we mainly localize is the string.xml file in the values folder. Of course, the entries of some programs may be scattered in other xml files. The values folder is the English language folder. Folders such as values-cs, values-fr, values-nb, etc. are language folders in other countries. The values-zh-rCN is the Simplified Chinese folder, and the values-zh-rTW is Taiwan Traditional.
(PS: So under what circumstances does the program display various languages? In fact, it is based on the regional settings in the system settings. Select Simplified Chinese, and it will automatically display the language in the values-zh-rCN folder. Sometimes when we browse the forum, we will see some streamlined versions of software, and the streamlined content has the streamlined item "streamlined language pack". In fact, it means to delete other unnecessary language packages values-xx and keep the language package valu that you need. es-xx only)
When the program only has a folder like values, we can manually create the values-zh-rCN folder ourselves and copy the files that need to be Chineseized under the values folder (some files in values, such as the public.xml file, cannot be copied). Usually we only need to copy the string.xml file and arrays.xml file. (string.xml controls the entries on the program interface and arrays.xml controls some menu options)
When we manually create the values-zh-rCN folder and implement Chineseization, it is called "embedded Chineseization"! This is a Chinese version without destroying the original values folder. Of course, if you don't even want the English language pack, you can directly Chineseize the entries in values. In this way, the program only has the Chinese language pack.
Having said so many principles, let's start Chinese translation!
Open string.xml with 920 text editor. You only need to Chineseize the entries between
When the const-string "xxxxxx" in the smali file is searched, these are actually decompiled from the classes.dex file. It should be noted here that after Chineseizing the xxxx content in const-string "xxxxx", it must be saved as "UTF-8" (the software will automatically save it in this format).
We can also directly search for const-string keywords to find the Chinese content we need. Let me emphasize again: It is recommended that you install the English version of the program on your mobile phone first, and then use it to learn Chinese.
Finally, after all the content has been translated into Chinese, use apktool to compile the folder you just decompiled back, then use apktool to sign it, and then you can install it!
>>>This tutorial was published by "My Mood My Rain", a member of "Huawei t8620 Bar". The original tutorial was appropriately adjusted and integrated into this tutorial by "Shuaihong" (BaiduID: Long Hong).