冒险解谜游戏中文网 ChinaAVG

标题: 【汉化资料】windows 语言设置项目及相关API [打印本页]

作者: shane007    时间: 2009-1-27 12:14
标题: 【汉化资料】windows 语言设置项目及相关API
一些非英语的AVG可能在游戏开始前调用了相关API进行判断,如果和设定语言不同,便进不了游戏。0 y. `. @/ O, J: k0 T! Y6 j
) C1 V# C' _$ J% d; l
http://www.microsoft.com/globaldev/reference/localetable.mspx4 k0 S5 I& U6 v1 Z
/ v2 A# D3 J9 @7 I) |( d) l0 U4 C
Language Group
  r% s2 T+ y8 S- a$ oThe language group controls which system locale, user locales, input locales, and User Interface (UI) languages a person can select.& r5 t8 G! D$ U3 U: ^" j* ]# j

' p  |$ }9 E" wWindows 2000 installs with the Western Europe and United States language group. Installing the Western Europe and United States is not optional, and this default cannot be removed.5 c8 }' g' _! g

& i& f7 e4 z2 b$ A& qFor each localized version the language group needed to display the system's UI language is also default and can't be removed. If the English version of Windows 2000 is installed in a non-English country, the user will typically install another language group. 7 Z' K* {& O7 P* t1 U

; [4 z2 o& u! j* {7 E, EWhen a person adds a language group Windows 2000 copies (but does not activate) the necessary keyboard files, Input Method Editors (IMEs), TrueType Font files, bitmap font files, and National Language Support (.nls) files. Adding a language group also adds registry values for Font Linking and installs scripting engines for Complex Script languages (Arabic, Hebrew, Indic, and Thai).
8 u' F! K# E- Y+ U0 u8 U/ ]7 p# E
( b1 [; @/ V( k  vIn addition to Western Europe and United States (default) there are sixteen language groups: Arabic, Armenian, Baltic, Central Europe, Cyrillic, Georgian, Greek, Hebrew, Indic, Japanese, Korean, Simplified Chinese, Thai, Traditional Chinese, Turkish, and Vietnamese. Any number and combination of language groups can be installed on any Windows 2000 version.
2 s4 y: Y  F) ]+ Y& j7 V
, P. L# K: p8 ~Example: A Spanish user is a translator for Russian. In order to type Russian texts he needs to install the Cyrillic language group. Note: The application, which is used to type the Russian documents needs to support this. Adding the appropriate language group will not automatically enable all application to accept text. If in doubt, try it out. Some legacy applications might require the system locale to be changed.
; L* Q- q- ?$ H; ]* n, @# e: O/ [8 t- Y, u" _( W4 D! ?
In Windows XP, Microsoft introduced Language Collections, which consolidate languages with similar properties into 3 collections that contains 3 or more language groups each. This is done to simplify installation, and improve user experience when working with multiple languages. On English Windows XP support for all European languages (including Baltic languages, Cyrillic languages, Greek, and Turkic languages) known as the Basic Language Collection is installed by default. Additional language collections (such as East Asian for Japanese, Chinese, and Korean, as well as complex scripts for Arabic, Hebrew, the Indic family of languages, and Thai) can also be installed. (After installing a language group or collection, the user will need to restart the computer.)
; d8 A* L4 i1 @4 u% d' B
$ {+ Z4 h7 S5 \2 H0 W: U; |' OTop of page% x% s3 e6 y% ~& y2 l7 G$ U
Locales
; F) p' d0 }/ U1 dA locale is either a language or a language in combination with a country. More than 130 locales are supported in Windows XP and Windows2000. 4 u% n8 Y  C+ Q) r* I$ W  ^. t' P

+ E: O) H2 k- s' t, C- hTop of page! m$ j' q$ @7 t9 a
System Locale
9 ^* u( X" G6 C3 Y1 B8 iThe system locale is not really a locale. It determines which codepages (ANSI, DOS, and Macintosh) are used on the system by efault. Changing the system locale also installs the necessary bitmap font files to support legacy applications in the language you selected.
3 p4 y% J0 m3 z
6 F* D) z7 `: i6 y2 I& g- aAs the name suggest, it's a per system setting. It requires a reboot to change. You can only select a system locale, if the appropriate language group is installed, i.e., you need the script support to select a system locale. * u. ^8 U' a0 _3 _) j6 j5 h

( Z8 D: ]% D2 q# }& MSome times there is no noticeable difference between two system locales.For example, there is no difference between the German Standard and German - Austria system locale. In general system locales of one language group are very similar and might be only different in the OEM or MAC codepage.
# N4 Z6 i. h1 I- H8 i1 z, x0 }$ a1 J) Y5 Q: `* Q
If it weren't be so long the system locale should be called legacy applications compatibility setting, because that is really what it is. Setting the system locale to a certain language instructs Windows 2000 to emulate a legacy operating system (DOS, Windows 3.1, and Windows 9x) localized to this language. Only applications, which are not fully Unicode, are affected by this setting.
& Y; m6 B- }2 F9 M4 A& Q
, v/ y% e( f2 w* Q4 D' wAn ANSI application should check the system locale at least during installation.
/ |' k$ @+ @' c. a- N: D
; E0 o- r- S) D$ a7 x2 t+ f$ v" UExample: 1 - A German user wants to run a Japanese application, which was designed for Japanese Windows 95. The user has to select Japanese as system locale to do this . Note: German legacy applications will not run flawlessly anymore. German umlauts will not be displayed correctly.
4 e! O* \3 e: y0 k
( q8 X/ |2 t" P) c# w( U9 o2 - The same German user wants to type Japanese text in a German legacy applications. The user has also to select Japanese as a system locale. Note: This will limit his ability to enter German text in legacy applications. German umlauts will not be displayed correctly.
) u& X& @1 f) I/ W8 |+ Q! I, r% F, h! k4 j# \1 ^1 Z
3 - An Arabic user wants to type Arabic, French, and English in an Arabic legacy applications. The user has to select Arabic as a system locale. The Arabic ANSI codepage contains most of the characters used for French and all of the English characters.
( N4 O( P& v7 n% T3 s7 M- M) g% E% d/ r: P
Top of page
0 {3 G) J) A  y, n9 A* ~User Locale
3 A9 ^# V1 V  x. ^6 @* bThe user locale determines, which default settings a user wants to use for formatting dates, times, currency, and large numbers. Although it's presented as a language (some in a combination with a country), it's not a language setting. That is, user locale Hebrew means that the user wants to use the standards of Israel, not really of the Hebrew language. The only language effect of the user locale is the names of the days and months. For example, if a person was using the long date format to display November 25, 1998,the November string would change based on user locale.
& ^4 z4 p% {- V2 Z/ D
4 h! p# T2 G$ aChanging the user locale, will automatically add an Input Locale with the default settings for the associated language. ! y9 ^9 j2 a7 [. B) }2 `! }
0 [2 ^  M8 J1 f% L: E. L
An application should use these settings to present data to the user (and most applications do this), but in some cases it might make sense for an application to use a fixed locale for display of data. This can be done by setting the Thread Locale to a fixed value during initialization of the application. 7 b% e# {1 g+ w. |( T# K7 |; j7 L
" S# r& `- y4 h6 B9 d$ w4 w
Example: An English user using English Windows 2000 works in Rome, Italy. The user selects Italian (Italy) as user locale, because he wants to use the formatting standards for Italy in his day-to-day work.
3 {6 G. e0 M5 g1 g
4 L- ~7 c8 t9 x; v3 {! ~$ ETop of page
2 q5 W/ ]8 t% ]% c: C( _) wThread Locale
! P9 j/ M$ g8 C- P" ^! FThe thread locale defaults to the user locale and determines the formatting dates, times, currency, and large numbers for the thread. It can be changed programmatically using the API SetThreadLocale. In most cases the thread locale should not be overwritten.
3 K) E0 H+ V3 h( L. n3 R' `8 K& W1 {4 h8 L
Example: A financial stock trading application for the New York Stock Exchange, which is used in a bank worldwide has to display the time, date, and stock prices in the US formats. This application uses SetThreadLocale to set the thread locale to English (United States) and can use the NLS APIs to format dates, times, and stock prices.
, E5 W& Y! Q( n4 L% C4 K2 T$ C4 h4 a& R
Top of page
4 ?- _- x0 I6 \& jInput Locale
# e1 B! M/ k# [* U9 a3 s8 fThe input locale describes a language a user wants to input (not necessarily type) and the method of input. There can be multiple input locales installed and the user can switch between them. * G/ D; o+ F( h7 [: Q$ C
: R0 J, B# D5 q9 p+ O' D
The default input locale is the input locale, which is active when a new application is started (or in some applications a new window is opened). Switching to a different input locale is done on a per application basis, i.e., you can have two different input locales in two different applications.
7 j5 D( Z: _: s2 x2 n6 g' }9 Y4 e$ R* @. `7 ?9 Q
Example: The user selected to type German using the International US keyboard layout, input English using voice input (with 3rd party software), and Chinese using an IME (Input Method Editor). ' t. j! i' K" E. d5 ^( t
& x  f8 L" x! T& v" V8 l3 {( e
Top of page
" }0 j5 M, g2 V+ tLanguages
: K: |" _0 n5 T/ O; Z" O, ZLanguages are identified by a LANGID, which has a primary language (e.g., Chinese) and a sub-language (e.g., PRC).
) Y# I9 E: v& h6 Z$ d* t5 S7 G9 l
8 [# E. A/ s0 l2 H; ETop of page9 @, A# b3 A3 |' z! [  T" i$ d" E
System UI Language (Install Language)
$ f6 b: A1 y3 g5 FThe system language is the language of the localized version that was used to setup Windows 2000. All menus, dialog, error messages, and help files are in this language, except on Windows 2000 Multilanguage Version, where the user can select a different language. * y" S) x6 f. E0 a! d6 j0 t

6 Y6 Z; j' k+ f/ RTop of page% i/ F; j3 q) ~7 H) i; Y
UI Language
+ ^& h1 Z- T8 K9 U; {Non-Multilingual-User Interface Windows 2000: The User UI language will be the System UI Language. # W# v: r) ^1 H$ q. L' E

- {3 R. `; f. d+ y0 s. r4 KMultilingual-User Interface: Windows XP and Windows 2000 MUI: Multilingual-User Interface (MUI) allows a person to change the language of the user interface.When a person is using MUI Windows 2000, they have the ability to change their User Language within the Regional Options control panel.
$ m1 l. C5 K( Y, {% ], H! Y
% |' @. |, D/ k6 |% ?# sIf a person changes their user language to see the effect the person will have to log off and then log back on. 0 Z3 D* _/ s: f6 u! X8 c+ p. R& H

- V( R3 R5 f) XExample: A multinational corporation wants to deploy Windows 2000 in all its subsidiaries. The IT department creates a global install job, which installs the English language version of Windows 2000 on all clients, regardless of the location of the client. At the same time it installs a "MUI pack" depending on the organizational unit the computer is member of. When the end user logs on the first time to his newly installed system Windows 2000 will appear very much like a localized version. $ |8 Q* N& [- I" G9 S
) q( O9 [# \. j2 S. z3 X% r
Top of page
4 b) R# a! S* g9 e$ y$ D: |- VGeographic ID  ]3 b9 ^% I* ]; r
This variable is available in Windows XP (and was also available in Microsoft Windows Millennium Edition [Windows Me] though not in Windows 2000) to define the country or location where the user lives. Each user can change this variable on the fly by selecting changes from the Regional Options tab of the Regional And Language Options property sheet. Any changes made are also applied on the fly. By selecting a particular location, the user has set a variable that a Web service (such as one that deals with weather) can check, thus allowing the Web service to deliver information and services specific to the region or country the user has selected. " d7 N3 O# W% b0 Q! s  x; x

7 w0 I) n; U. F+ S$ t! [* `9 N8 pExample: A user traveling to Malaysia wants to get the weather forecast for that locale and sets the location to that country. The location is a user variable that cannot be changed programmatically. The only way to change it is for the user to do so manually.
( A+ _, y. Z( ?& B3 a0 q
' T! J$ n+ e( M3 T! g* OTop of page: h9 {& j2 X9 W- n
Glossary
# }0 O# X4 X2 Z- TLegacy Application. f% ]2 k1 V9 M" e
8 r1 N& S8 }5 l0 y  w* z0 d
In this document legacy application is used to describe applications, which are not completely Unicode. If you are not sure if an application is completely Unicode, it most likely isn't. Virtually all applications designed for Windows 3.1, Windows 95, and Windows 98 are not Unicode (the exception here is Office 2000). 6 Z; N# A5 M- `# N

8 P7 Y' I9 v3 K" g! ^Codepage
0 @5 W& A% [+ D  Z. U# B8 {4 Z/ R3 }
A codepage is an ordered set of characters in which a numeric index (code point values) is associated with each character. The first 128 characters of each codepage are functionally the same and include all characters needed to type English text. The upper 128 characters of OEM and ANSI codepages contain characters used in a language or group of languages.
作者: firendless    时间: 2009-4-22 16:06
转载了。3 b, e8 h$ h& m# m
给你个补偿
作者: shane007    时间: 2009-4-22 17:04
谢谢!另外看见你在饭否上夸我像土拨鼠了。




欢迎光临 冒险解谜游戏中文网 ChinaAVG (https://chinaavg.com/) Powered by Discuz! X3.2