Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

400 lines
9.6 KiB

  1. <%
  2. 'Response.Write "<br>LCID: " & session.LCID
  3. 'Response.Write "<br>GetLocale Function: " & GetLocale
  4. 'Response.Write "<Br>Hex: " & Hex(GetLocale)
  5. 'Response.Write "<br> HTTP_ACCEPT_LANGUAGE: " & Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")
  6. Dim strAcceptLanguage
  7. Dim strLCID
  8. Dim strPos
  9. Dim strAbb
  10. strAcceptLanguage = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")
  11. strPos = InStr(1, strAcceptLanguage, ",")
  12. If strPos > 0 Then
  13. strAcceptLanguage = Left(strAcceptLanguage, strPos - 1)
  14. End If
  15. 'Response.Write "<br>Results: " & strAcceptLanguage
  16. Select Case LCase(strAcceptLanguage)
  17. Case "af"
  18. strLCID = 1078 ' Afrikaans
  19. strAbb = "AFK"
  20. Case "sq"
  21. strLCID = 1052 ' Albanian
  22. strAbb = "SQI"
  23. Case "ar-sa"
  24. strLCID = 1025 ' Arabic(Saudi Arabia)
  25. strAbb = "ARA"
  26. Case "ar-iq"
  27. strLCID = 2049 ' Arabic(Iraq)
  28. strAbb = "ARI"
  29. Case "ar-eg"
  30. strLCID = 3073 ' Arabic(Egypt)
  31. strAbb = "ARE"
  32. Case "ar-ly"
  33. strLCID = 4097 ' Arabic(Libya)
  34. strAbb = "ARL"
  35. Case "ar-dz"
  36. strLCID = 5121 ' Arabic(Algeria)
  37. strAbb = "ARG"
  38. Case "ar-ma"
  39. strLCID = 6145 ' Arabic(Morocco)
  40. strAbb = "ARM"
  41. Case "ar-tn"
  42. strLCID = 7169 ' Arabic(Tunisia)
  43. strAbb = "ART"
  44. Case "ar-om"
  45. strLCID = 8193 ' Arabic(Oman)
  46. strAbb = "ARO"
  47. Case "ar-ye"
  48. strLCID = 9217 ' Arabic(Yemen)
  49. strAbb = "ARY"
  50. Case "ar-sy"
  51. strLCID = 10241 ' Arabic(Syria)
  52. strAbb = "ARS"
  53. Case "ar-jo"
  54. strLCID = 11265 ' Arabic(Jordan)
  55. strAbb = "ARJ"
  56. Case "ar-lb"
  57. strLCID = 12289 ' Arabic(Lebanon)
  58. strAbb = "ARB"
  59. Case "ar-kw"
  60. strLCID = 13313 ' Arabic(Kuwait)
  61. strAbb = "ARK"
  62. Case "ar-ae"
  63. strLCID = 14337 ' Arabic(U.A.E.)
  64. strAbb = "ARU"
  65. Case "ar-bh"
  66. strLCID = 15361 ' Arabic(Bahrain)
  67. strAbb = "ARH"
  68. Case "ar-qa"
  69. strLCID = 16385 ' Arabic(Qatar)
  70. strAbb = "ARQ"
  71. Case "eu"
  72. strLCID = 1069 ' Basque
  73. strAbb = "EUQ"
  74. Case "bg"
  75. strLCID = 1026 ' Bulgarian
  76. strAbb = "BGR"
  77. Case "be"
  78. strLCID = 1059 ' Belarusian
  79. strAbb = "BEL"
  80. Case "ca"
  81. strLCID = 1027 ' Catalan
  82. strAbb = "CAT"
  83. Case "zh-tw"
  84. strLCID = 1028 ' Chinese(Taiwan)
  85. strAbb = "CHT"
  86. Case "zh-cn"
  87. strLCID = 2052 ' Chinese(PRC)
  88. strAbb = "CHS"
  89. Case "zh-hk"
  90. strLCID = 3076 ' Chinese(Hong Kong)
  91. strAbb = "ZHH"
  92. Case "zh-sg"
  93. strLCID = 4100 ' Chinese(Singapore)
  94. strAbb = "ZHI"
  95. Case "hr"
  96. strLCID = 1050 ' Croatian
  97. strAbb = "HRV"
  98. Case "cs"
  99. strLCID = 1029 ' Czech
  100. strAbb = "CSY"
  101. Case "da"
  102. strLCID = 1030 ' Danish
  103. strAbb = "DAN"
  104. Case "n"
  105. strLCID = 1043 ' Dutch(Standard)
  106. strAbb = "NLD"
  107. Case "nl-be"
  108. strLCID = 2067 ' Dutch(Belgian)
  109. strAbb = "NLB"
  110. Case "en"
  111. strLCID = 9 ' English
  112. strAbb = "USA"
  113. Case "en-us"
  114. strLCID = 1033 ' English(United States)
  115. strAbb = "USA"
  116. Case "en-gb"
  117. strLCID = 2057 ' English(British)
  118. strAbb = "ENG"
  119. Case "en-au"
  120. strLCID = 3081 ' English(Australian)
  121. strAbb = "ENA"
  122. Case "en-ca"
  123. strLCID = 4105 ' English(Canadian)
  124. strAbb = "ENC"
  125. Case "en-nz"
  126. strLCID = 5129 ' English(New Zealand)
  127. strAbb = "ENZ"
  128. Case "en-ie"
  129. strLCID = 6153 ' English(Ireland)
  130. strAbb = "ENI"
  131. Case "en-za"
  132. strLCID = 7177 ' English(South Africa)
  133. strAbb = "ENS"
  134. Case "en-jm"
  135. strLCID = 8201 ' English(Jamaica)
  136. strAbb = "ENJ"
  137. Case "en"
  138. strLCID = 9225 ' English(Caribbean)
  139. strAbb = "ENB"
  140. Case "en-bz"
  141. strLCID = 10249 ' English(Belize)
  142. strAbb = "ENL"
  143. Case "en-tt"
  144. strLCID = 11273 ' English(Trinidad)
  145. strAbb = "ENT"
  146. Case "et"
  147. strLCID = 1061 ' Estonian
  148. strAbb = "ETI"
  149. Case "fo"
  150. strLCID = 1080 ' Faeroese
  151. strAbb = "FOS"
  152. Case "fa"
  153. strLCID = 1065 ' Farsi
  154. strAbb = "FAR"
  155. Case "fi"
  156. strLCID = 1035 ' Finnish
  157. strAbb = "FIN"
  158. Case "fr"
  159. strLCID = 1036 ' French(Standard)
  160. strAbb = "FRA"
  161. Case "fr-be"
  162. strLCID = 2060 ' French(Belgian)
  163. strAbb = "FRB"
  164. Case "fr-ca"
  165. strLCID = 3084 ' French(Canadian)
  166. strAbb = "FRC"
  167. Case "fr-ch"
  168. strLCID = 4108 ' French(Swiss)
  169. strAbb = "FRS"
  170. Case "fr-lu"
  171. strLCID = 5132 ' French(Luxembourg)
  172. strAbb = "FRL"
  173. 'Case "gd"
  174. 'strLCID = 1084 ' Gaelic(Scots)
  175. 'strAbb = ""
  176. 'Case "gd-ie"
  177. 'strLCID = 2108 ' Gaelic(Irish)
  178. 'strAbb = ""
  179. Case "de"
  180. strLCID = 1031 ' German(Standard)
  181. strAbb = "GER"
  182. Case "de-ch"
  183. strLCID = 2055 ' German(Swiss)
  184. strAbb = "DES"
  185. Case "de-at"
  186. strLCID = 3079 ' German(Austrian)
  187. strAbb = "DEA"
  188. Case "de-lu"
  189. strLCID = 4103 ' German(Luxembourg)
  190. strAbb = "DEL"
  191. Case "de-li"
  192. strLCID = 5127 ' German(Liechtenstein)
  193. strAbb = "DEC"
  194. Case "e"
  195. strLCID = 1032 ' Greek
  196. strAbb = "ELL"
  197. Case "he"
  198. strLCID = 1037 ' Hebrew
  199. strAbb = "HEB"
  200. Case "hi"
  201. strLCID = 1081 ' Hindi
  202. strAbb = "HIN"
  203. Case "hu"
  204. strLCID = 1038 ' Hungarian
  205. strAbb = "HUN"
  206. Case "is"
  207. strLCID = 1039 ' Icelandic
  208. strAbb = "ISL"
  209. Case "in"
  210. strLCID = 1057 ' Indonesian
  211. strAbb = "IND"
  212. Case "it"
  213. strLCID = 1040 ' Italian(Standard)
  214. strAbb = "ITA"
  215. Case "it-ch"
  216. strLCID = 2064 ' Italian(Swiss)
  217. strAbb = "ITS"
  218. Case "ja"
  219. strLCID = 1041 ' Japanese
  220. strAbb = "JPN"
  221. Case "ko"
  222. strLCID = 1042 ' Korean
  223. strAbb = "KOR"
  224. 'Case "ko"
  225. 'strLCID = 2066 ' Korean(Johab)
  226. 'strAbb = ""
  227. Case "lv"
  228. strLCID = 1062 ' Latvian
  229. strAbb = "LVI"
  230. Case "lt"
  231. strLCID = 1063 ' Lithuanian
  232. strAbb = "LTH"
  233. Case "mk"
  234. strLCID = 1071 ' Macedonian
  235. strAbb = "MKD"
  236. Case "ms"
  237. strLCID = 1086 ' Malaysian
  238. strAbb = "MSL"
  239. 'Case "mt"
  240. ' strLCID = 1082 ' Maltese
  241. 'strAbb = ""
  242. Case "no"
  243. strLCID = 1044 ' Norwegian(Bokmal)
  244. strAbb = "NOR"
  245. Case "no"
  246. strLCID = 2068 ' Norwegian(Nynorsk)
  247. strAbb = "NON"
  248. Case "p"
  249. strLCID = 1045 ' Polish
  250. strAbb = "PLK"
  251. Case "pt-br"
  252. strLCID = 1046 ' Portuguese(Brazilian)
  253. strAbb = "PTB"
  254. Case "pt"
  255. strLCID = 2070 ' Portuguese(Standard)
  256. strAbb = "PTG"
  257. 'Case "rm"
  258. ' strLCID = 1047 ' Rhaeto-Romanic
  259. 'strAbb = ""
  260. Case "ro"
  261. strLCID = 1048 ' Romanian
  262. strAbb = "ROM"
  263. 'Case "ro-mo"
  264. 'strLCID = 2072 ' Romanian(Moldavia)
  265. 'strAbb = ""
  266. Case "ru"
  267. strLCID = 1049 ' Russian
  268. strAbb = "RUS"
  269. 'Case "ru-mo"
  270. 'strLCID = 2073 ' Russian(Moldavia)
  271. 'strAbb = ""
  272. 'Case "sz"
  273. ' strLCID = 1083 ' Sami(Lappish)
  274. 'strAbb = ""
  275. Case "sr"
  276. strLCID = 3098 ' Serbian(Cyrillic)
  277. strAbb = "SRB"
  278. Case "sr"
  279. strLCID = 2074 ' Serbian(Latin)
  280. strAbb = "SRL"
  281. Case "sk"
  282. strLCID = 1051 ' Slovak
  283. strAbb = "SKY"
  284. Case "s"
  285. strLCID = 1060 ' Slovenian
  286. strAbb = "SLV"
  287. 'Case "sb"
  288. 'strLCID = 1070 ' Sorbian
  289. 'strAbb = ""
  290. Case "es"
  291. strLCID = 1034 ' Spanish(Spain - Traditional Sort)
  292. strAbb = "ESP"
  293. Case "es-mx"
  294. strLCID = 2058 ' Spanish(Mexican)
  295. strAbb = "ESM"
  296. Case "es"
  297. strLCID = 3082 ' Spanish(Spain - Modern Sort)
  298. strAbb = "ESN"
  299. Case "es-gt"
  300. strLCID = 4106 ' Spanish(Guatemala)
  301. strAbb = "ESG"
  302. Case "es-cr"
  303. strLCID = 5130 ' Spanish(Costa Rica)
  304. strAbb = "ESC"
  305. Case "es-pa"
  306. strLCID = 6154 ' Spanish(Panama)
  307. strAbb = "ESA"
  308. Case "es-do"
  309. strLCID = 7178 ' Spanish(Dominican Republic)
  310. strAbb = "ESD"
  311. Case "es-ve"
  312. strLCID = 8202 ' Spanish(Venezuela)
  313. strAbb = "ESV"
  314. Case "es-co"
  315. strLCID = 9226 ' Spanish(Colombia)
  316. strAbb = "ESO"
  317. Case "es-pe"
  318. strLCID = 10250 ' Spanish(Peru)
  319. strAbb = "ESR"
  320. Case "es-ar"
  321. strLCID = 11274 ' Spanish(Argentina)
  322. strAbb = "ESS"
  323. Case "es-ec"
  324. strLCID = 12298 ' Spanish(Ecuador)
  325. strAbb = "ESF"
  326. Case "es-c"
  327. strLCID = 13322 ' Spanish(Chile)
  328. strAbb = "ESL"
  329. Case "es-uy"
  330. strLCID = 14346 ' Spanish(Uruguay)
  331. strAbb = "ESY"
  332. Case "es-py"
  333. strLCID = 15370 ' Spanish(Paraguay)
  334. strAbb = "ESZ"
  335. Case "es-bo"
  336. strLCID = 16394 ' Spanish(Bolivia)
  337. strAbb = "ESB"
  338. Case "es-sv"
  339. strLCID = 17418 ' Spanish(El Salvador)
  340. strAbb = "ESE"
  341. Case "es-hn"
  342. strLCID = 18442 ' Spanish(Honduras)
  343. strAbb = "ESH"
  344. Case "es-ni"
  345. strLCID = 19466 ' Spanish(Nicaragua)
  346. strAbb = "ESI"
  347. Case "es-pr"
  348. strLCID = 20490 ' Spanish(Puerto Rico)
  349. strAbb = "ESU"
  350. 'Case "sx"
  351. ' strLCID = 1072 ' Sutu
  352. 'strAbb = ""
  353. Case "sv"
  354. strLCID = 1053 ' Swedish
  355. strAbb = "SVE"
  356. Case "sv-fi"
  357. strLCID = 2077 ' Swedish(Finland)
  358. strAbb = "SVF"
  359. Case "th"
  360. strLCID = 1054 ' Thai
  361. strAbb = "THA"
  362. 'Case "ts"
  363. ' strLCID = 1073 ' Tsonga
  364. 'strAbb = ""
  365. 'Case "tn"
  366. ' strLCID = 1074 ' Tswana
  367. ' strAbb = ""
  368. Case "tr"
  369. strLCID = 1055 ' Turkish
  370. strAbb = "TRK"
  371. Case "uk"
  372. strLCID = 1058 ' Ukrainian
  373. strAbb = "UKR"
  374. Case "ur"
  375. strLCID = 1056 ' Urdu
  376. strAbb = "URD"
  377. 'Case "ve"
  378. 'strLCID = 1075 ' Venda
  379. strAbb = ""
  380. Case "vi"
  381. strLCID = 1066 ' Vietnamese
  382. strAbb = "VIT"
  383. 'Case "xh"
  384. 'strLCID = 1076 ' Xhosa
  385. 'strAbb = ""
  386. 'Case "ji"
  387. 'strLCID = 1085 ' Yiddish
  388. 'strAbb = ""
  389. 'Case "zu"
  390. 'strLCID = 1077 ' Zulu
  391. 'strAbb = ""
  392. Case Else
  393. strLCID = 2048 ' default
  394. strAbb = "USA"
  395. End Select
  396. 'Session.LCID = clng(strLCID)
  397. %>