Skip to main content

Translate Foreign language Andoid Application apks into Khmer

If you haven’t read about Stage 1 on how to add Khmer Language support to Android OS yet click here (it contains links to download all required tools to translate apk)

Nokorsoft.com
Fig 2. battery settings

2.a Translate an APK app






Fig 2.a MIUI File Manager (partly translated)
Concept: 
  1. get the apk
  2. decode it
  3. modify the resources (xml, photos)
  4. encode it back (repackage it)
  5. sign it (without signing it you won’t be able to run it properly)
  6. install it on your phone to test it, when you are happy with the translation share it to the world.
Required tools:
AndroidSuite v115.exe (ICS support)
Notepad++ version 6

2.a.1 install Android Suite & Notepad++

-extract Android Suite to C:\androidsuite\ (or anywhere you can remember)
-run the notepad++ installer (in here,  npp.6.0.Installer.exe), and follow the instruction on its screen to install.

2.a.2 What to translate and how  to translate apk resource files

What to translate:
Pretty much, all we need to translate are xml files such as strings.xml, arrays.xml and plurals.xml in values or values-en folders. And images in drwable-hdpi folder
Understand apk resource folder structure

An encoded folder would contain res folder and smali folder.
Most of the time you only need to work on files in following list of res folder.
—————–
drawable: contains xml files that define how an element of the screen (buttons, dropdown lists…) displays.
drawable-hdpi (drawable-en-hdpi): contains images used in the apk (icons, background, animated images…)
layout (layout-land, layout-port): contains xml files to define how each screen of apk display (information dailog, main windows…..) in landscape and portrait screen.
raw folder: contains html files and its required files. (something like displaying error page)
values: default values(strings.xml, plurals.xml, arrays.xml) . most of the time, you will work on values-en folder.
note: values-en, values-zh-rCN, value-en-rAU folders: language resource. If your phone is set to other language rather than English United State, ex: English-Australia, then you need translate resources in value-en-rAU folder; otherwise just translate values-en.
xml folder: contains other xml files.
Smali Folder: contains smali codes (like a low level java source code), sometimes they contains const-strings that you may want to translate as well. But I want you too touch it, unless you know what you’re doing.  you can use notepad++ to work with it.
Play around with these folder until you understand what they are for.
————-
Ok, let’s play with xml file

Use notepad++ (or other xml editors) to open the xml file. And translate things in between <string name=”xxxx”>here</string>. But be careful when work with date time string and string contains % in front of it. Don’t translate  strings that have % in front of them.
Example
<string name=”app_name”>FileExplorer</string>
to
<string name=”app_name”>គ្រប់គ្រងឯកសារ</string>
When doing the translation, make sure you use simple term that easy for user to understand. You don’t know how to translate some words, check English – Khmer computer glossary
app_name, app_lable, or label, normally, refer to the name of the application that appear on your launcher home screen.
Let’s play with images in drawable-hdpi
well, you can use photoshop or just a simple paint software to modify the image resources. I won’t talk much about this.
resources.arsc
after you recompile it, the value folders and other folders will pack into resources.arsc.

2.a.3 Working on Android Suite


Fig 2.a.3.1 Android Suite interface (Click on it to Enlarge)

Fig 2.a.3.2 Android Suite Folder structure (click to enlarge)
Before we start, we need to understand AndroidSuite folder structure:
You will find the follow folders in C:\andriodsuite (or where you just extracted the file to)
—–
apk folder: where you put the apk files that you want to translate into Khmer
decoded-apks folder: where you can find resource of  decompiled apk folder (such as xml, jpg, png, smali)
encoded-apks folder: where you can find the modified apks (that you just translated).
unsigned folder: you any apk file and rename it into apk.apk, then click on [App Signer]  button on the Android Suite to sign the apk.
—–
Ok, now we are ready. (look at the pictures above Fig 2.a.3.1)
Step 1: Copy the apk that you want to translate to the apk folder.
in this example FileExplorer.apk.
- click on [Open APK dir], and copy your apk into it.
- click on [Refresh lists] to update the screen.
Step 2: decoded the apk file.
- click on [<< Refresh list] to update the screen. and select your apk from “select what to decode”
- click on [Decode Selected] (and wait until the progress bar stop)
- click on [Open decoded Dir] to find the FileExplorer folder. (check out section 2.a.2 on how to translate resources)
Step 3 & 4: encode the apk file.
-on your Android Suite software, click [<<Refresh lists], select your apk resource folder name from the list under “what to encode “
- click on [Encode Selected] (and wait until the progress bar stop)
- click on [Open Encoded Dir] to find the your modified FileExplorer.apk.
Step 5: sign the apk file.
- copy the apk file to unsigned folder, then rename it into apk.apk
- click on “apk signer” to generate signed file. Once it’s done, you will see signed-apk.apk. Now you can rename it to anything you like, but I prefer you to rename it into signed-apkname.apk (example: signed-fileexplorer.apk).
ប្រភព Nokorsoft.com

Comments

Popular posts from this blog

វិធីសាស្រ្ត Unlock bootloader របស់ Motorola

ធ្លាប់បានលឺច្រើនមកហើយអំពីវិធីសាស្រ្ត Unlock bootloader ផ្សេងៗដូចជា  SONY ,  HTC , Nexus ជាដើម តែអ្វីដែលយើងមិនធ្លាប់ដឹងនិង សាកល្បងគឺពពួក Motorola តែម្តង។ វិធីសាស្រ្តផ្សេងៗត្រូវបានអនុវត្តហើយ វាផ្តល់នូវលក្ខណៈងាយស្រួលផ្សេងៗគ្នាដើម្បីឲ្យយើងមានសិទ្ធកាន់តែច្រើនទៅលើការប្រើប្រាស់ទូរស័ព្ទទំនើបរបស់យើង។ ថ្ងៃនេះខ្ញុំសូមណែនាំពីវិធី unlock bootloader របស់ពពួកMotorola វិញម្តងដែលម៉ាកមួយនេះ ហាក់ដូច ជាមិនសូវពេញនិយមក្នុងទីផ្សារយើងសោះ។ តែយ៉ាងណាក្តីក៏ខ្ញុំព្យាយាមប្រមូលរាល់ពត៌មានទូរស័ព្ទដែលមានទាំងអស់មកដាក់ក្នុងនេះផងដែរ។ ចំពោះជំហ៊ាននៃការប្រតិបត្តិមានដូចខាងក្រោម៖ ទាញយក  fastboot ទាញយក  driver តម្លើង driver ពន្លា fastboot ប្រើប្រស់  terminal  របស់ Windows ដើម្បីចូលទៅទីតាំង fastboot. exe បើកទូរស័ព្ទចូលទៅ fastboot ដោយចុច Power+ vol  Down ហើយដោតខ្សែ  USB  ទាំងព្រម វាឃ្លាខាងក្រោម $ fastboot oem get_unlock_data បន្ទាប់មកវានឹងបញ្ហានូវទិន្ន័យដូចគំរូខាងក្រោម $ fastboot oem get_unlock_data (bootloader) 0A40040192024205#4C4D3556313230 (bootloader) 30373731363031303332323239#BD00 (bootloader) 8A672BA474

how to install khmer on Sony Ericsson X8

 ខ្ញុំ​បានអាន​នូវឯកសារ​របស់​សមាជិកមម្នាក់ក្នុងក្រុម CAUG (Cambodia Android User Group) ស្តីអំពីការ តំលើង ភាសារដែល​អាច​មើល​បាន​ត្រឹម​ត្រូវ ដាក់ចូល​ទៅក្នុង​ទូរស័ព្ទ Xperia X8 របស់​ក្រុមហ៊ុន​សូនី។ សូមមើលជំហ៊ាននៃការធ្វើតាមលំដាប់ដូច​ខាងក្រោម

Orkida English-Khmer Dictionary

ថ្ងៃ​នេះ​សុំ លើក​យក​វត្ថុ​បូរាណ​ ប៉ុន្តែ​ពេញ​និយម ដែល​ត្រូវ​បាន​ដំឡើង​ស្ទើគ្រប់​កុំព្យូទ័រ​បង​ប្អូន​ខ្មែរ​យើងគឺ វចនានុក្រម Orkida English<->Khmer ។ សង្ឃឹម​ថា​ម្ចាស់​បង្កើតវចនា​នុក្រម​នេះ មិន​យល់​ទាស់​អី​ទេ ដែល​ខ្ញុំ​ដាក់​អោយ​គេ​ទាញ​យក​ជាសាធារណះ​ដូច្នេះ ព្រោះ​ថា​វា​កម្មវិធី​ដែល​បង្កើត​ឡើង​តាំង​ពីឆ្នាំ ១៩៩៨មក​ម្ល៉េះ ម្យ៉ាង​វិញ​ទៀតបង​ប្អូន​យើង​បាន​ចម្លង​ពីមួយ​ទៅ​មួយស្ទើរ​គ្រប់​កុំព្យូទ័រ​ ទៅ​ហើយ។ ដោយ​ឡែក​ពេល​ខ្ញុំ​សាកល្បង​ស្វែង​រក​ក្នុង Google អំពី​វចនា​នុក្រម​នេះ ហាក់​ដូច​ជា​ស្ងាត់​ឈឹង​ មិនសូវ​មាន​កន្លែង​ Download សោះ ! ដូច្នេះ​ដើម្បី​អោយ​ការ​ស្វែង​រកក្នុង​អ៊ិនធឺណិត​ទាក់​ទង​នឹង​ស្រុក​ខ្មែរ​ យើងកាន់​តែមាន​​ប្រសិទ្ធភាព ខ្ញុំ​សម្រេច​ចិត្ត​ Upload វា​ចូល​ក្នុង Hosting របស់​ខ្ញុំ​ ហើយ​ចែក​អោយ​បងប្អូន​ដែល​ត្រូវ​ការ​វា​ យក​ទៅ​ប្រើ​ប្រាស់​ចុះ។ ថ្វីត្បិត​តែ​វា​រាង​ចំណាស់​បន្តិច​មែន តែ​រហូត​មក​ដល់​ Windows 7 ហើយ​ វា​នៅ​តែ​អាច​ដំឡើង​និង​ប្រើ​បាន​ជា​ធម្មតា។ ទាញ​យកវចនានុក្រម​ Orkida By : Sam Vichea