Process for adding Burmese

Source: Internet
Author: User
Tags skia
1. Modify the productconfig. mk file.

Find the macro mtk_product_locales in the mediatek/config/$ {project}/projectconfig. mk file and add the language code to be added. For example, the Burmese language is my_mm;

2. Add ICU resource 2.1. Copy the TXT file of the ICU resource to the corresponding folder.

Because the ICU resources of my_mm are not available in version 4.4.1 but are available in version 4.6 of android4.0, the corresponding TXT files can be copied from android4.0 to the corresponding directory;

For example, in the colldirectory, after the my.txtand my_mm.txt files are uploaded, see:

 

After these directories are copied, search for my under the Data Directory and the following results should be displayed:

This indicates that all data has been copied.

2.2 modify the compilation configuration file

Icuresource compilation on gbis the ultimate project in icudt44l-large.dat. the configuration file is in the icudt44l-large.txt file. Find this file and add the Burmese content to it.

 

Icudt44l-large.txt File Location

 

Open this file and add the corresponding content to the file copied to the Data Directory, which is my. Res and my_mm.res. For details, refer to the following:

Modify the ICU configuration file

2.3 modify the external/icu4c/studata/Android. mk file.

This is also to modify the compilation configuration of ICU resources and add my content to large.

 

2.4 compile ICU Resources

The process of compiling ICU resources on GB is cumbersome. For details about the process, refer to the "GB compiling ICU process" in another document ".

Note that you need to complete all the steps in that document; otherwise, the ICU resources remain unchanged during the new and remake projects;

3. Add a font library

For the detailed process of this part, refer to another document, "how to add a new font". Here is a brief step.

3.1 copy the font to the framework/base/data/font directory

As shown in, put the TTF file directly under this directory.

Copy the TTF File

3.2 Add the font file to the compilation options

Modify the frameworks/base/data/fonts/Android. mk file:

Copy_from: = \

Droidsansmono. TTF \

My. TTF \

......

3.3 modify the external/skia/src/ports/SKFontHost-android.app File

For example, add my. TTF to gfbnames:

4. Add framework string

Add a new values-my-RMM folder under frameworks/base/CORE/RES/, create a strings. xml file, and put the translation content of frameworks in this file:

5. Add app string

Translate each app, create the values-my-RMM folder under the res directory of each app, and put the translated strings. XML in it;

6. re-build the entire project

Use the new or remake command to build again. If all the above steps are successful, you will see an additional Burmese option in the language selection.

7. FAQs about the Add Process

1) After the ICU resources are added and compiled successfully, the font library is added. The new language option cannot be found in the setting language list.

The possible reasons are as follows:

(A) no code for the new language is added to mtk_product_locales (mediatek/config/$ {project}/projectconfig. mk. The language code format is xx_yy where XX is the language code (ISO_639-1), YY is the country or region code that uses the language (ISO_3166-1 ). For example, my_mm.

(B) If no language string translation is added under frameworks/base/CORE/RES, a corresponding language translation should be added, such as values-My and values-my-RMM. during testing, you can copy string files from other languages for verification.

2) After adding a new language, the setting language List displays □□.

Cause: the corresponding font library or font library is not added successfully. For more information, see faq04513.

3) after adding a new language, select the language in the language list, and the interface is displayed in English.

Cause: No Strings in this language are added to res of the app.

4). Other issues that need attention.

(1) If no language is added in each version of the ICU, then you need to add these resources according to the specified format (you can find the most similar language and region to be added, copy and modify it, such as adding Cantonese, cantonese is similar to zh_cn). For details about ICU resources, refer to faq04553.

(2) If a TXT resource is added to the corresponding directory (usually external \ icu4c \ data \ Coll, curr, etc.), you need to modify the corresponding MK file, otherwise, the newly added resources will not be compiled into the DAT file during the compilation process.

(3) When modifying the file (external/skia/src/ports/SKFontHost-android.app), the font addition is sequential-sensitive, that is, the font placed in front of the system will give priority to the system when loading. if a font file is added, but a blank line is displayed in the settings menu, place the corresponding font file in front.

(4) When adding a language not supported by the platform, although the language can be successfully added according to the steps, it is not guaranteed that the language can be used normally. First, you need to translate all the string resources under the framework and app, and then check whether the characters in the language are correctly displayed (generally because of the font, You need to purchase from a third party ), there are also character Deformation Problems in complex languages (such as Mongolian, Tibetan, and Uighur ). Another consideration is whether the platform supports the input method in this language. If not, you need to add the language yourself.

(5) to add or open a language, you only need to add the code for this language and use the country code at mtk_product_locales, the add rule is xx_yy (refer to FAQ 1-> A). For example, zh_cn is the correct Simplified Chinese language and ZH or CN should not be added.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.