冒险解谜游戏中文网 ChinaAVG

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

作者: shane007    时间: 2009-1-27 12:14
标题: 【汉化资料】windows 语言设置项目及相关API
一些非英语的AVG可能在游戏开始前调用了相关API进行判断,如果和设定语言不同,便进不了游戏。
( f' `/ v, x1 M4 S0 V& F  r" e1 b. f; j( I, o1 [: ]
http://www.microsoft.com/globaldev/reference/localetable.mspx
0 e9 G; L  V# o) Q! Q- I! U* v
) \' A( o- ^0 `! j* [( {0 \Language Group: @+ n: e, ~2 n2 [$ m" i7 _9 E
The language group controls which system locale, user locales, input locales, and User Interface (UI) languages a person can select.
$ E5 j5 ~' M' L8 x$ V% a+ N& g* r' [2 h4 e) b6 W, o0 O
Windows 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.
3 C) c1 F" ?( Q; s- W1 _1 {* o2 U( o: `3 |( U9 t' t! P
For 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. 3 E- ?& L& T8 g, T$ Q# X, M9 _
9 q4 P7 J4 m  f7 M! }" d& t
When 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).2 J/ w9 V$ N0 H8 C3 _, R9 F

) w  Z5 X5 c& RIn 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.
; C5 p' Z# A7 w: T% D
* N2 O+ B$ u& B  i4 IExample: 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. $ X$ V3 q8 Z& t& |5 V" x( Q

1 p" N' ]( ^$ B, MIn 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.)
- l  q# w& j! @; r5 G
$ n0 l7 _& @9 j6 E$ O9 S/ ]' MTop of page6 |% A: Q- z' p0 O  H' ]0 w
Locales
0 `5 [. F/ M+ N2 r1 g; @A locale is either a language or a language in combination with a country. More than 130 locales are supported in Windows XP and Windows2000.
- H+ i1 q8 B6 b+ N6 P! o- j2 P1 o1 Z& K2 h/ V' b' h4 F
Top of page
# w* }5 X+ R' I0 k: KSystem Locale
8 T) \( @4 X5 K5 HThe 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. . {' ^) w. V( s6 {
9 ^; D0 j. u% W* j: f
As 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.
( U9 D* j: y/ m$ V- `' d& h2 F! ^, `, a* H& Y
Some 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. 2 R3 M/ j# K; Y5 j; ~( k
5 {: U1 A% F( a% }
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.
; Y8 {' P) n* `" {5 J% t! j, U3 }" b: b9 c* w" X
An ANSI application should check the system locale at least during installation. ; ]/ V# G. z  C$ N5 B

0 s: \# A0 ^/ r$ V+ `" eExample: 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. . y- t( f$ T8 D7 P) E  J/ \1 }1 v

  h) }- I/ c, J/ X* u8 V2 - 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.
3 I  G- `& Q3 Y8 ?$ v+ q
: u. \4 R0 B/ _8 n7 r7 W3 - 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.
6 o; S( a) i5 D- q7 S2 Z; R9 w9 ~' R4 h$ g$ L5 y# E/ H: ^1 M: q0 R5 s
Top of page
& r! B6 Z* d9 x. W$ YUser Locale
7 T5 S: w. j% vThe 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.
! g: k9 W( k* W' u( f# H: w! h3 S& z; W# q: X3 ~" C
Changing the user locale, will automatically add an Input Locale with the default settings for the associated language.
. A$ O$ ~/ W# m9 A+ e9 c5 t; y- K8 F! `. r; ?9 s
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.
  T" f( \8 p+ v; W' L9 u" F9 @0 I. G% O+ j4 X# K) a
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.
- N- U1 H. p8 G" o3 r  Y0 R( s
0 ]5 T$ j! e" PTop of page
# V5 m2 @: B! tThread Locale
; L- }7 k- w" S6 k' q( p2 hThe 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. 5 w$ V) _" W1 t5 F

, s5 N, \$ b% ~! `( ?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. 5 [* R, _! A: E. I. _) o' a- X2 }
; Y5 n+ O& R" [' z
Top of page( K4 {4 L/ |6 N) s& ^6 |
Input Locale
; u0 j2 @7 i  g* T" 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.
2 F$ r/ d$ q8 z, i! ~
) P% y4 O  [9 f# P  d* I; \8 bThe 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.
9 o* ~0 s$ P& X+ n: D5 C" L3 ?' i" o# v/ r: t
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).
, z8 p1 [5 _$ a/ I4 K$ J
5 O6 \  U; `1 D+ \$ M- YTop of page
4 X. g4 q7 A+ o! A8 JLanguages
0 D  l, R  ^" d* |( s. eLanguages are identified by a LANGID, which has a primary language (e.g., Chinese) and a sub-language (e.g., PRC).
, U- h% z" |+ [$ F# r$ z; C
/ Y8 J7 {! g, V6 i& j3 h- kTop of page
# t! x5 ^! o9 V7 |& M. r  [System UI Language (Install Language)" R& }2 X. h- b: H9 C
The 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. ( b% X% J9 C7 Y$ ?1 ~
$ L+ c1 K2 P# y: w
Top of page
* P6 s6 y7 S) H0 g4 \UI Language- s$ ?0 Z( D! R: `
Non-Multilingual-User Interface Windows 2000: The User UI language will be the System UI Language. + |7 n- {" G1 E7 t2 c/ v0 O5 o
  _! I! }; m  f' g5 @/ P
Multilingual-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. 8 L/ s) C' D3 }) J4 x) n

1 j* m8 l: r% ^2 C1 \) Y" nIf a person changes their user language to see the effect the person will have to log off and then log back on. ) n9 j3 Z& h7 v. g5 o( n

( o  q% \" w1 P/ MExample: 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.
+ N& @) M0 b) s+ m4 l
+ j. f. [  I* [; E1 _Top of page9 ]- \, t) n; ?! f4 ?
Geographic ID
( t0 j6 B! }2 y, mThis 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. " I: O" C9 J' L; t

% F9 W4 T! N* _# v+ zExample: 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.
: e, F; B: H$ e8 t7 P- f+ @  M5 ^' e/ M) ?) ?6 f
Top of page( L2 M7 N( V5 U7 j( E
Glossary
, }$ J, M. i* n6 ?' GLegacy Application. i: Q# i4 W/ c$ }
+ v5 D: v3 {9 `6 `& g! m
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). 3 Y( ]! f' s- e8 n5 Z, a3 t1 Z
5 f% o& [8 d+ y5 h
Codepage
: ^% J8 S/ @# }' K! X% {% p& H
. V, V4 I5 m+ a* DA 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
转载了。
# |, E0 I0 F2 Y9 {( U给你个补偿
作者: shane007    时间: 2009-4-22 17:04
谢谢!另外看见你在饭否上夸我像土拨鼠了。




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