Linux International Localization and Chinese Culture

xiaoxiao2021-03-06  97

Yu Xiang [China Linux Forum] [Beijing TurboLinux]

An internationalization, localization and Chinese culture

Internationalization, localization and multilingual concept

In general, "internationalization" refers to the process of rewriting the computer system or application software originally designed to support multiple languages ​​and cultural practices. In the early days of software creation, the general programming language, compile, development is To support English, in order to adapt to a broader language and cultural custom, the software is necessary to support multi-language extension characteristics in design structures and mechanisms. This process is called internationalization. Internationalization is only available in software design Multilingual possibilities.

"Localization" refers to the process of transitioning computer systems or application software to use and compatible with a particular language. For example, software that is originally made to support Chinese is a localization. It mainly includes translation text Information, interface information, redesign icons, etc.

Language and cultural customs differ greatly depending on the region. The language environment for a particular area is called "local". It includes not only language and currency units, but also digital marked format, date and time format. Internationalized The software contains "locale" "Parameters" and uses this "local" parameter to set the language environment used in a region.

The part of dealing with the language in the international part is called "multilingualization". For example, a "multilingual" software can manage simultaneously, such as English, French, China Japanese Korean, Arabic, etc.

In English, internationalization is abbreviated as I18N, ie, only two letters, 18 intermediate letters. Similarly, localization is L10N, multilingualization abbreviation is M17N.

Today, Internet links the computer around the world, sharing information and technology is an inevitable trend and needs. So computer systems can becomes more and more important, in the process of Linux system, Linux, Linux, Linux The software also needs international and localization.

Chinese culture

"Chinese" is a vague concept. "Chinese" "Chinese" on Linux does both make software or system internationalization, but also to make software localization. That is, "Chinese culture" is not just software Localization is such a simple thing, more importantly, because Linux directly supports Chinese software too little software, do "Chinese" must be "international".

Due to historical reasons, the Chinese used in this stage also has the score of Simplified Chinese and Traditional Chinese. The encoding used is also different. Software that supports Chinese should support Simplified Chinese and Traditional Chinese, which puts higher the internationalization of software. Requirements.

In 1999, it was the most important year in China's Linux development and popularization. Among them, many companies produced Chinese Linux released versions. The Chinese Linux technology has adopted the shortcuts of Chinese culture ---- Chinese platform. Although they are all Chinese platform, but the specific technical features are different. Fully demonstrate the charm of Chinese platforms in the process of Linux. Chinese platform has played a huge role in the short term, accelerating Linux's Chinese culture process and promoting Linux in China. universal.

The main technical features of the Chinese platform are not to modify WIV applications, they can be displayed and entered in Chinese (some cases will fail). Specifically, use their own specifications to modify the underlying function of the X system. From the modified level Listed into (1) Modify the library libx11.so, this way is dynamic modification, but also known as an export mode. The implementation of the plug-in mode can be directly modified or using LD_PRELOAD to load dynamic library modifications. (2) Modify X Server Part, also known as the inline mode, its implementation is divided into two, directly modify the X Server section and establish a virtual Display (partial agent of the X Transmission Protocol).

X11 Internationalized History and Level

In the early X11R4 version, only the function that supports single-byte and double-byte fonts, so it can't be considered an international library. Since then, a X association called "mltalk" is established and started to study the internationalization of the X window system Question. Numerous X-window system suppliers have also participated in the organization. Because the research of internationalization has just begun, MLTALK has made a basic problem: What is the internationalization of X-window system? The explanation of it is also different In fact, even now, people's definitions of internationalization still have disagreement, and the focus of differences is mainly focusing on how the software or system is considered to be real international. According to the international level, the following The situation is internationalization:

The language can be switched. You can set a language when the system starts.

Software to use different languages ​​can be used at the same time, and you can set a language when the application is started.

Software using different languages ​​can be used simultaneously, and the language of the application can be dynamically switched

Software using different languages ​​can be used at the same time, and can be used in different languages ​​at the same time in the application

Obviously, in the most complete way of the (4), the second is sub-item (3), sub-(2). MLTALK finally decided to use subsection (3), the reason is to support The X-window system supplier of subsection (4) is a few. From the current internationalization of Linux, the internationalization software of subsection (2) and (3) is the most common, but subordinate (4) The software is relatively rare, and the meaning of the application is not very big.

Based on the above view, the purpose of X11R5 is that the creation support does not need to recompile the source code. It can be adapted to the language environment Application software development platform. Examples, the international structure is based on standard C function setLocale. X11R5 established the following specification :

Switching language mechanism

Export interface with language-independent output

Input interface-independent input interface

Internationalization of resource files

X Tools (XT) Internationalization

Since then, based on X11R5, OSF / MotiF has completed international transformation, and has become a high-level graphics software library that is widely accepted by users. Until today, some large software still uses Motif as a base library, such as Java, Netscape et al. X11R5 While developing, in order to detect the practicality of the specification, two sets of sample applications, XSI and XIMP. Two sets of applications are different on the input protocol and the support of LOCALE, thus bringing inconvenience to developers .

X11R6 solves the problems existing in X11R5, and the main changes are

Define the standard input protocol

Locale data format definition

Sample application module with an international tool

On the output, X11R6 adds a writing method from the left to support Arabic and Hebrew, etc., increasing the writing method from top to bottom to support Chinese and Japanese.

International Standards Organization

The international standards mentioned here are some standards for international standard organizations or some relevant organizations, and these standards will also be updated with time. The international standard involves character set, coding, font processing, printing, text drawing , User interface, language input method, data exchange, cultural custom, and equation.

Some organizations that develop international standards are listed below:

Li18NUX (Linux i18n)

ANSI (American National Standards Institute)

POSIX (Portable Operating System Interface for Computer Environments)

ISO (International Standards Organization)

IEEE (Institute of Electrical and Electronics Engineers)

Unicode consortium

Open Group (x consortium and osf)

X / Open and XPG

Among them, ANSI / ISO has developed a general interface to write international software using C programming languages. ISO has sets a standard set standard and other standards that affect the Locale name. IEEE provides some international universal library functions and settings to manage Different Locale users Command. Open Group is an international standard for UNIX and X window systems. Li18NUX is an organization specializing in software international norms specializing in Linux.

Internationalization meaning

Internationalization, especially the standards developed in internationalization are required to develop international software today. It is also an inevitable trend of software development. Follow international standards, can develop and debug software and transplant software more efficiently, reduce software Developing fees, users are more convenient to use software. From the international environment, newly developed basic library functions will support international standards, based on the application software developed by these function libraries, the application software is regularly supported, and there is a large number of Linux enthusiasts have transformed software that have previously compliant with international standards, enabling them to be in line with international standards. Software to eliminate non-international standards is a trend. From internationalization History of development, many of these standards have Japanese business agencies, support Japanese software has become more and more, and from Japanese software transplantation as Chinese software is quite easy to transplant the Western software, sometimes do not change, so In contrast, in turn, Chinese software in line with international standards affect Japanese and Korean software, and the trend of snowballs is developed forward. Secondly, software vendors are developing more optimistic about the Japanese market in the Asian market. Japanese software or operating system on UNIX / Linux is generally in line with international standards, so it is necessary to compatibility. Of course, there is still a shortcomings in the current international standard, especially for Chinese. Because of the processing of both GB and BIG5 unable to coexist, it should be made by the Chinese in the original basis.

For Chinese Linux, the internationalization is also an inevitable trend. On the Chinese platform-based Chinese Linux, software transplantation has become a problem that must be solved. The final solution of this problem is to follow the same standard, so far The international standard is the only way. Given the chaos of Chinese platform on Linux, the international standard is an inevitable pathway from disordered to ordered transition.

The international standardization of software also brings great benefits to end users. In terms of simplified Chinese and traditional Chinese, Chinese operations are double-byte operations, and Chinese input can use the benefits of standard input interfaces in greater extent. Such as interactive operations such as positioning of the server.

Another feature of internationalization is to work in the application level, so internationalization does not bring instability to the X window system.

Reference:

Linux i18n: http://www.li18nux.org/

Two locale

Locale concept

Locale is the most basic logo in the ANSI C language. For Chinese Linux, if it supports internationalization, support Chinese Locale is the most basic requirement.

Locale is a language environment in which software is running, which includes language (TERRITORY), TERRITORY and CODESet. The format is: language [_ region [. Character set]]. Such as the Chinese GBK character set, Locale's format is: zh_cn.gbk. There are currently in Chinese locale on Linux. Many of Glibc2.1.x is not correct. If users need to install Chinese GBK LOCALE, you can use TLC6.0 directly. middle:

GLIBC-2.1.2 (containing GBK module)

Localedata-en-0.07

/usr/x11r6/lib/x11/locale/en_cn.gbk/xlc_locale (GBK LOCALE below)

Locale contains the following category:

LC_COLLATE for comparison and sorting. Sorting Chinese is more important, but the current GLIBC has some problems with Chinese support. There are many ways to sort in Chinese characters, according to pronunciation (Chinese Pinyin) or Chinese character pen painting It is easier to accept.

LC_CTYPE for characters classification

LC_MONETORY for currency units

LC_NUMERIC, for digital display format. Below is different from different countries in currency symbols and digital formats:

Mainland China: 1,234.56RMB

USA: $ 1,234.56

Germany: 1.234, 56dm

LC_TIME, for time and date. Time can be calculated in a format of 12 hours or 24 hours. You can use a comma or colon between hours and minutes. Below is the time and date of some local settings:

China: 14:20 March 14, 2000

United Kingdom: 02:20 pm 14/03/2000

United States: 02:20 PM 03/14/2000

Finland: 14.20 14.03.2000lc_Messages, for international information, mainly prompt information, error information, status information, title, tag, buttons, and menus, etc.

Locale initializes Locale data via ansi C function setLocale (classification, local). When Locale is set to empty, Locale's value is made from the system's environment variable. In order to facilitate application software, set all the categories, you can use the following method :

SetLocale (lc_all, ");

If it is not successful, the function returns NULL. The function should fall back to SetLocale (lc_all, "c").

Locale in X

In the client, use Locale's mechanism and in the standard C function, in the standard C function, in addition to this, two other functions have also defined in the X library to determine X's Locale support and set Locale modification ( XModifier, the basic steps of using local and libx11 in X are as follows:

SetLocale (): Set the current local

XSupportlocale (): Used to determine if x supports the current set of LOCALE.

XSETLOCALEMODIFIER (): It is used to specify a series of local corrections. Its parameted format is @ category = assignment. The current unique available is the name "IM" of the input server. If the parameter is empty, depending on the system's environment variable XModifiers lookup. For example, set environment variables on the system:

% setENV XMODIFIERS @ im = chinput (csh) or

% export xmodifiers = im = chinput (bash)

The client program will find the input server chINPUT, "chinput" is the name set by the Enter the server.

Differences in cultural customs

Below is a place that is often encountered in the internationalization and localization process, the development of international software should fully pay full attention to the culture and habits of all regions, and develop universal software, for localization, The habit of consistent with the local domain should be selected.

Special information such as name, address

The "surname" and "name" in the name, the order of the address book, the length of the phone number, etc.

Universal icon

The icon is an easy-to-accept user interface. It should be considered when designing geographic habits, and the icon cannot have graphic text, otherwise you need to redesign the local icon and translate the text on the icon.

Sound use

Inappropriate sounds or tips may cause the human resentment. In addition, the gender of sound is sensitive to certain countries.

Color use

Color and tones are related to folk customs, such as the danger of red in the United States, express joy in China.

Paper size

The size of the paper is different from the region, should pay attention to when selecting the default size.

Keyboard difference

The keys on the keyboard may vary from country to country, and the number of keys may not be the same.

Political Factors

In product design, try not to have a political sensitivity part.

Reference:

LOCALE on Linux

http://www.ping.be/linux/locales/index.shtml

GBK LOCALE

FTP: //ftp.turbolinux.com.cn/pub/Turbolinux/Turbolinuxc-6.0/srpms/srpms/localedata-EN-0.07-1.src.rpm

转载请注明原文地址:https://www.9cbs.com/read-104319.html

New Post(0)