ntlang-20040805
[openafs.git] / src / config / NTLang.bat
1 @echo off
2 rem Copyright 2000, International Business Machines Corporation and others.
3 rem All Rights Reserved.
4 rem 
5 rem This software has been released under the terms of the IBM Public
6 rem License.  For details, see the LICENSE file in the top-level source
7 rem directory or online at http://www.openafs.org/dl/license10.html
8
9 REM AFS build environment language selection for Windows NT.
10 REM ########################################################################
11
12
13 REM ########################################################################
14 REM Accept language name as an argument; default to English.
15
16 rem # Detect requests for English
17 rem
18 if "%1"=="eng" goto en_US
19 if "%1"=="english" goto en_US
20 if "%1"=="English" goto en_US
21 if "%1"=="ENGLISH" goto en_US
22 if "%1"=="en_US" goto en_US
23 if "%1"=="EN_US" goto en_US
24 if "%1"=="en_us" goto en_US
25 if "%1"=="EN_us" goto en_US
26 if "%1"=="" goto en_US
27
28 rem # Detect requests for Japanese
29 rem
30 if "%1"=="jap" goto ja_JP
31 if "%1"=="japanese" goto ja_JP
32 if "%1"=="Japanese" goto ja_JP
33 if "%1"=="JAPANESE" goto ja_JP
34 if "%1"=="ja_JP" goto ja_JP
35 if "%1"=="JA_JP" goto ja_JP
36 if "%1"=="ja_jp" goto ja_JP
37 if "%1"=="JA_jp" goto ja_JP
38
39 rem # Detect requests for Korean
40 rem
41 if "%1"=="kor" goto ko_KR
42 if "%1"=="korean" goto ko_KR
43 if "%1"=="Korean" goto ko_KR
44 if "%1"=="KOREAN" goto ko_KR
45 if "%1"=="ko_KR" goto ko_KR
46 if "%1"=="KO_KR" goto ko_KR
47 if "%1"=="ko_kr" goto ko_KR
48 if "%1"=="KO_kr" goto ko_KR
49
50 rem # Detect requests for Chinese (Simplified; PR China)
51 rem
52 if "%1"=="chi" goto zh_CN
53 if "%1"=="chinese" goto zh_CN
54 if "%1"=="Chinese" goto zh_CN
55 if "%1"=="CHINESE" goto zh_CN
56 if "%1"=="zh_CN" goto zh_CN
57 if "%1"=="ZH_CN" goto zh_CN
58 if "%1"=="zh_cn" goto zh_CN
59 if "%1"=="ZH_cn" goto zh_CN
60
61 rem # Detect requests for Chinese (Traditional; Taiwan)
62 rem
63 if "%1"=="tai" goto zh_TW
64 if "%1"=="taiwan" goto zh_TW
65 if "%1"=="Taiwan" goto zh_TW
66 if "%1"=="TAIWAN" goto zh_TW
67 if "%1"=="zh_TW" goto zh_TW
68 if "%1"=="ZH_TW" goto zh_TW
69 if "%1"=="zh_tw" goto zh_TW
70 if "%1"=="ZH_tw" goto zh_TW
71
72 rem # Detect requests for Brazilian Portuguese
73 rem
74 if "%1"=="bra" goto pt_BR
75 if "%1"=="por" goto pt_BR
76 if "%1"=="brazil" goto pt_BR
77 if "%1"=="Brazil" goto pt_BR
78 if "%1"=="BRAZIL" goto pt_BR
79 if "%1"=="pt_BR" goto pt_BR
80 if "%1"=="PT_BR" goto pt_BR
81 if "%1"=="pt_br" goto pt_BR
82 if "%1"=="PT_br" goto pt_BR
83
84 rem # Detect requests for German
85 rem
86 if "%1"=="ger" goto de_DE
87 if "%1"=="german" goto de_DE
88 if "%1"=="German" goto de_DE
89 if "%1"=="GERMAN" goto de_DE
90 if "%1"=="de_DE" goto de_DE
91 if "%1"=="DE_DE" goto de_DE
92 if "%1"=="de_de" goto de_DE
93 if "%1"=="DE_de" goto de_DE
94
95 rem # Detect requests for Spanish
96 rem
97 if "%1"=="esp" goto es_ES
98 if "%1"=="spa" goto es_ES
99 if "%1"=="spanish" goto es_ES
100 if "%1"=="Spanish" goto es_ES
101 if "%1"=="SPANISH" goto es_ES
102 if "%1"=="es_es" goto es_ES
103 if "%1"=="es_ES" goto es_ES
104 if "%1"=="ES_ES" goto es_ES
105 if "%1"=="ES_es" goto es_ES
106
107 rem # Complain if we couldn't match the requested language
108 rem
109 echo Don't know how to build language %1.
110 goto end
111
112 rem # Language Identifiers
113 rem #
114 rem # LANGNAME:
115 rem #    A simple abbreviation reflecting a language and sublanguage.
116 rem #    Our translation lab picks these and uses them when giving
117 rem #    us back translated files.
118 rem #
119 rem # LANGID:
120 rem #    A decimal representation of a 16-bit Win32 LANGID matching that
121 rem #    language and sublanguage. The format and relevant constants are
122 rem #    defined in WINNT.H--the upper 6 bits are the sublanguage, and
123 rem #    the lower 10 bits are the language. For example:
124 rem #    LANG_ENGLISH = 9
125 rem #    SUBLANG_ENGLISH_US = 1
126 rem #    LANGID = MAKELANGID(9,1) = 000001 0000001001 = 0x0409 = 1033
127 rem # 
128 rem # LANGCP:
129 rem #    The default code page for this language; this value is used when
130 rem #    building a .RC file with the /c switch. You'll have to look these
131 rem #    up in a some table somewhere if you add more languages.
132 rem
133
134 :en_US
135 set LANGID=1033
136 set LANGNAME=en_US
137 set LANGCP=1252
138 echo Building English resources (%LANGID%, %LANGNAME%)
139 goto arg2
140
141 :ja_JP
142 set LANGID=1041
143 set LANGNAME=ja_JP
144 set LANGCP=932
145 echo Building Japanese resources (%LANGID%, %LANGNAME%)
146 goto arg2
147
148 :ko_KR
149 set LANGID=1042
150 set LANGNAME=ko_KR
151 set LANGCP=949
152 echo Building Korean resources (%LANGID%, %LANGNAME%)
153 goto arg2
154
155 :zh_CN
156 set LANGID=2052
157 set LANGNAME=zh_CN
158 set LANGCP=936
159 echo Building Chinese (Simplified: PR China) resources (%LANGID%, %LANGNAME%)
160 goto arg2
161
162 :zh_TW
163 set LANGID=1028
164 set LANGNAME=zh_TW
165 set LANGCP=950
166 echo Building Chinese (Traditional: Taiwan) resources (%LANGID%, %LANGNAME%)
167 goto arg2
168
169 :pt_BR
170 set LANGID=1046
171 set LANGNAME=pt_BR
172 set LANGCP=1252
173 echo Building Brazilian Portuguese resources (%LANGID%, %LANGNAME%)
174 goto arg2
175
176 :es_ES
177 set LANGID=1034
178 set LANGNAME=es_ES
179 set LANGCP=1252
180 echo Building Spanish resources (%LANGID%, %LANGNAME%)
181 goto arg2
182
183 :de_DE
184 set LANGID=1032
185 set LANGNAME=de_DE
186 set LANGCP=1252
187 echo Building German resources (%LANGID%, %LANGNAME%)
188 goto arg2
189
190 ###############################################################################
191 # Accept a second command-line argument reflecting a command to execute
192
193 :arg2
194 if "%2"=="" goto end
195 %2 %3 %4 %5 %6 %7 %8 %9
196 goto end
197
198 :end
199 echo.
200