设为首页收藏本站官方微博

【汉化资料】windows 语言设置项目及相关API

[复制链接]
查看: 1586|回复: 2
打印 上一主题 下一主题

【汉化资料】windows 语言设置项目及相关API

跳转到指定楼层
楼主
发表于 2009-1-27 12:14 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

【汉化资料】windows 语言设置项目及相关API

一些非英语的AVG可能在游戏开始前调用了相关API进行判断,如果和设定语言不同,便进不了游戏。
( h3 s* d! J% B" L7 N
, T( o" T% C$ P' c1 A# Whttp://www.microsoft.com/globaldev/reference/localetable.mspx
; q" [# J$ h, K! @- L4 D( r. m$ T
; C6 N9 Q+ m7 z2 E) ~- U+ OLanguage Group
2 D& T; t& m1 ?9 k0 Z. U& }The language group controls which system locale, user locales, input locales, and User Interface (UI) languages a person can select.9 b; t/ b6 T! n9 {# ]+ f+ `

+ Y+ S1 j' M: I) _3 aWindows 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.
8 _6 S9 J6 Z' u4 d# J0 ^6 h3 n8 c5 F) K7 j8 q8 k$ V! ~+ K
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. & h7 m! Q$ ~0 ~# g

: e1 Q) g" d. T( }. kWhen 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).
/ Z) C+ U* ^+ U! @  u; C5 f, t, H! Q9 |: w% K
In 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.
' u3 t( s5 b5 G6 g  z, A
- J3 q' {! l, ]) r4 b" M  YExample: 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. 4 S3 a1 r. q: X3 S

7 [( }0 I. K: X; W6 O0 g- p' v' nIn 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.)
* \* ^+ N- G% ]* `3 F/ N- s; X, ~9 Y( m
Top of page
) {/ \" k/ [: v5 \6 c1 H. LLocales
/ y5 ^1 x- s0 T( u! AA locale is either a language or a language in combination with a country. More than 130 locales are supported in Windows XP and Windows2000.
& b" Y' s5 u% n( c4 B; }4 |9 v( V% i( N/ J2 V7 M, [
Top of page7 A1 ?: j3 N$ X3 l2 I) \
System Locale
  L5 `7 }) {+ r% n1 u& _The 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.
) N- {% R+ m9 _/ @0 r7 H' P
$ m4 R: \& V1 E, G$ oAs 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.
' Q7 H' z: j4 }% ?/ ~! M3 u
  b+ w+ c/ e# I3 w# {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. + A1 u( l" }4 p

# P0 {) n9 ^9 r+ ?# GIf 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. ^5 h! d5 `" c
7 d( G% t  B# O6 JAn ANSI application should check the system locale at least during installation.
" b! h5 Q. M( H
0 q7 I0 x6 e( C/ `/ pExample: 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.
0 N. n7 p7 Y/ v% ^/ s# c# ^2 d5 T1 Y0 y  i' _# z4 b$ q
2 - 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. 2 _. q0 Y# Z  q8 s  \8 ~

$ d; x. L4 v  P2 W9 K/ E# S3 - 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.
8 N1 H* B( I! V9 O$ J2 ?* y/ G3 m6 y' H% ]5 t8 \
Top of page
/ b. h$ J( ]/ X- H. R9 Y$ hUser Locale
/ b/ ^! v4 Z/ B! ?The 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. ( y* ?9 W5 T: k8 p8 I3 f

; E2 L8 {/ o1 t5 H& C* vChanging the user locale, will automatically add an Input Locale with the default settings for the associated language.
& J! A. p/ A7 C0 m. i% y" d; N) T3 u+ `
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. * L7 b  P% G* J# W9 n

% N" l, R( u% u" d) zExample: 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. # q( I; P) m: b* u% T
! [* J, _/ I- Z) p: @% u1 ]4 N
Top of page
: T4 s: D: R$ o7 W$ _/ N: KThread Locale' O/ {( ?& X* S3 @! ]
The 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. 2 ~. R) w, y$ }  U* l0 U* T
$ b' P& B0 i! A, p# v$ c0 \' r: ]
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. / v! O8 r8 k1 |+ @$ V; k
  b* q1 @$ ?3 `; S9 ?
Top of page. l! }- ?1 p) e4 b
Input Locale
' g4 H3 e4 f) T: oThe 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. 8 c( K8 q& W+ `, ~! @2 }
& d# I( U$ |' l
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. 6 h2 g+ E  H# X
' c  f1 ?% Y6 w( ?1 r
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). + A) r# t3 I4 `1 h

' S0 z/ M. U3 S3 E  xTop of page) X. q7 n5 a2 D! |% X& _
Languages
9 `; Q2 l( w9 tLanguages are identified by a LANGID, which has a primary language (e.g., Chinese) and a sub-language (e.g., PRC).
9 k# x6 ~6 [1 ?/ C- ?: t% w, f0 J
$ D4 L: I! O2 D& Q; bTop of page) E2 W( ^4 w! p  V5 R
System UI Language (Install Language)' y+ o. S7 i. \( n3 g# T4 a
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.
; c0 Z, Y+ |" F7 E$ l* l# }
. ]# {1 D4 d) {Top of page
# f; |5 D! C' T' iUI Language
) @4 d. k7 F. N1 n" [* [, [Non-Multilingual-User Interface Windows 2000: The User UI language will be the System UI Language. , Q, ~1 V% `: n1 ?3 d

) p  k1 H  L" F3 ZMultilingual-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.
% }* i6 D( t9 }2 u' b7 Q1 A- u& f
* W, {. N7 R: Q% d9 N, nIf a person changes their user language to see the effect the person will have to log off and then log back on. " T( W' _( q- D$ F" K9 P$ g# n

. r) N* k. p5 \2 X$ ]: }* r: qExample: 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.
0 V4 @! f4 ~1 \0 c
6 H1 m4 d6 M" F9 u, o* s. G: ^Top of page( N1 K& O; x  _6 E
Geographic ID
* ]2 s" i6 k! O( e' @% N/ O1 bThis 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.
, G& P6 a: o, a% D, }" y. P
, c5 \0 l) o4 j! T6 D- B& ~) WExample: 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. ( j; }6 Q5 B1 e$ B! P5 z
: ?+ }! P" \# ]3 Z8 ^1 j
Top of page3 f# J  z- [( v  p: C1 P* R
Glossary
( b! `6 S7 q$ U, I! XLegacy Application! e$ ~8 c- p: b( G# p& Q1 N" l, b

, d* {! w1 Z/ {- B3 M4 _2 QIn 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). ) W5 c2 g* H' {. i

9 b. a9 Q! h( k+ rCodepage
: h5 U, c% O0 m
7 n. S9 c5 C6 x/ |7 ~& J  fA 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.
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 很美好很美好 很差劲很差劲
回复

使用道具 举报

沙发
发表于 2009-4-22 16:06 | 只看该作者
转载了。
1 z8 A* x- b  I/ [, P9 C给你个补偿

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

板凳
 楼主| 发表于 2009-4-22 17:04 | 只看该作者
谢谢!另外看见你在饭否上夸我像土拨鼠了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

冒险解谜游戏中文网 ChinaAVG

官方微博官方微信号小黑屋 微信玩家群  

(C) ChinaAVG 2004 - 2019 All Right Reserved. Powered by Discuz! X3.2
辽ICP备11008827号 | 桂公网安备 45010702000051号

冒险,与你同在。 冒险解谜游戏中文网ChinaAVG诞生于2004年9月9日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

快速回复 返回顶部 返回列表