现在的位置: 首页 > 综合 > 正文

Multilingual User Interface (MUI) OS Design Development

2018年04月05日 ⁄ 综合 ⁄ 共 6885字 ⁄ 字号 评论关闭

The Multilingual User Interface (MUI) allows users to change the language of the
user interface (UI). Using MUI, you can generate a single run-time image for
multiple target languages and markets.

 

You can include the Multilingual User Interface (MUI) Catalog item
in your OS design by choosing the item from the Catalog. Choosing this Catalog
item sets the appropriate Sysgen variable for enabling MUI.

 

MUI Font Linking

Describes how to include fonts in your run-time image so that the UI appears
correctly for all of the supported languages.

 

Fonts affect the way that the user interface is displayed on a Multilingual
User Interface (MUI)–enabled run–time image. Therefore, working with languages
that may use different fonts requires special considerations. Font linking
solves nearly all of the potential problems that may arise. Other issues can be
handled with appropriate registry settings.

To enable the UI to appear correctly for all of the supported languages, you
must include the appropriate fonts in the run–time image.

For more information about including fonts in your run–time image, see
Fonts OS
Design Development.

In an MUI–enabled run–time image, font linking checks for the current user UI
language registry value, and then associates it with code page data in the font
file to ensure the correct font is linked for the target.

When the run–time image boots, the Graphics, Windowing, and Events Subsystem
(GWES) checks if a value for the UI language has been set for the
HKEY_CURRENT_USER/MUI/CurLang
registry key. If a value has been set for
this key, GWES will check the LCID that is specified under this key against a
list that includes all the locales that are supported in Windows Embedded CE and
match the locale with the associated code page. GWES will use the data in the
font code page to determine which font should be considered as the default link
font.

When a user changes the default UI language, thereby initiating a call to SetUserDefaultUILanguage
,
and then resets the device, GWES will read the new LCID value and check for the
font that has the matching code page to use as a default link font.

Font linking data is stored in the registry under the
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/FontLink/SystemLink
registry
key.

If your run–time image includes more than one East Asian locale, you must
modify the values under the SystemLink
registry key in common.reg to
include the font files for all of your targeted locales. You must list all of
the font files by using a semicolon separator as shown in the following
example:


Copy Code
[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/FontLink/SystemLink]
"Arial"="//Windows//simsun.ttc,NSimSun;//Windows//msgothic.ttc,MS UI Gothic"
"Times New Roman"="//Windows//simsun.ttc,NSimSun;//Windows//msgothic.ttc,MS UI Gothic"
"Tahoma"="//Windows//simsun.ttc,NSimSun;//Windows//msgothic.ttc,MS UI Gothic"
"Courier New"="//Windows//simsun.ttc,NSimSun;//Windows//msgothic.ttc,MS UI Gothic"
"Symbol"="//Windows//simsun.ttc,NSimSun;//Windows//msgothic.ttc,‚c‚e"Á'¾ƒSƒVƒbƒN'Ì"


Note:
To avoid conversion problems, Microsoft recommends that you do not use
localized font names when you list East Asian font files in common.reg.

Note:
When adding the font names to common.reg, you must list each font with its
English name.

After you have listed the fonts for all of your East Asian locales under the
default SystemLink
key, you must delete any other instances of the
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/FontLink/SystemLink
registry key
that may be present in common.reg.

MUI font linking also supports the concept of skipped characters. These allow
you to define one or more Unicode characters that should be obtained from the
linked font, even if they are present in the base font. Data for skipped
characters is stored under the
HKEY_LOCAL_MACHINE/Software/Microsoft/FontLink/SkipTable
registry
key.

The default skip table requires no locale identifier to be set. Therefore,
the content of the default skip table may be shared between different locales.
For locales that use a skip table with different characters than the ones in the
default skip table, the skip table must be preceeded by the LCID in the
registry.

The following example shows a skip table that may be shared among Japanese,
Simplified Chinese, and Traditional Chinese. Because the skip table used for
Korean differs from the default skip table, the Korean LCID (0412) has been
added after the default skip table, and separated with a semi–colon. The content
of the Korean skip table has been added after the LCID.


Copy Code
Tahoma"="005c,00a5,007e,0391-03c9,2026,2116,221a,25a0-25ff;:005c"

As with the SystemLink
registry key, after you have specified the skip
table under the HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/FontLink/SkipTable

registry key, you must delete any other instances of the
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/FontLink/SkipTable
registry key
that are present in common.reg.

After you have specified the font linking and skip table information, you
must save common.reg and rebuild your run–time image.

For more information about font linking or skip tables, see
Enabling
Linked Fonts.

 

MUI Implementation

Describes how to use locale data, code pages, localized operating-system UI
resources, and fonts to configure which UI languages are supported.

 

The MUI includes resources for each supported UI language, separated from
their binaries, and provided in separate language directories. To achieve the
goal of user-switchable language in a specific target device, the target device
must have the locale data, code pages, and fonts for all the UI languages to be
supported. These are configured when the OS design is created or can be added
later.

In addition, you must set any needed operating system UI resources in ROM,
such as the localized resources for the default language. Additional languages
can be included in the run-time image, or potentially installed later.

Typically, you select the set of languages that a target device is capable of
supporting by including particular code pages and locales when you build the
run-time image. A target device that includes the code-page 1252 would, for
example, usually include all of the western European locales that use that
code-page. Because the bulky portion of locale support is the code-page, the
incremental cost of including all locales that share a code page is small. This
target device might ship with the UI resources for say, English and French. If a
user later wanted to upgrade the target device to support German as well, they
would only need to install the UI resource DLLs for German for the run-time
image and for all of their applications.

When you build an MUI-enabled run-time image, you also need to specify the
default language of the run-time image.

 

 

MUI Locale
Considerations

Describes how to determine which locales should be shared on a device and
which language to specify as the default.

 

 

When you build an MUI–enabled run–time image, you need to make special
considerations pertaining to the locales you want to support.

Generally, it is easiest to build a target device that enables users to
switch between related languages, especially between languages that share a
single code page, such as the 1252 code page shared by most western European
languages.

It may be possible to build a target device that switches between one or more
East Asian locales and one or more non–Asian locales, such as a target device
that supports Japanese and English. However, the default UI language must be the
East Asian locale. For example, if a user switches the UI from Japanese to
English, the code base that supports the Japanese IME is still available, even
if it is not visible in the new language.


Default UI Value


Note:
If your target device uses Control Panel, you can determine the default UI
locale by using the Regional Settings
dialog box. On a system that has no
UI, the system shows the default UI value.

The Regional Settings
dialog box includes a message to notify
the user that a system reset is required. This message can be customized to
match the requirements of your OS design.

 

 

 

 

抱歉!评论已关闭.