Author: dchapyshev
Date: Wed Dec 17 10:30:31 2008
New Revision: 38157
URL:
http://svn.reactos.org/svn/reactos?rev=38157&view=rev
Log:
- More implement GetCPInfoExW
- Add resources for getting localized of code pages names
Added:
trunk/reactos/dll/win32/kernel32/lang/en-US.rc (with props)
trunk/reactos/dll/win32/kernel32/lang/ru-RU.rc (with props)
Modified:
trunk/reactos/dll/win32/kernel32/locale_rc.rc
trunk/reactos/dll/win32/kernel32/misc/lang.c
Added: trunk/reactos/dll/win32/kernel32/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/lang/en…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/lang/en-US.rc (added)
+++ trunk/reactos/dll/win32/kernel32/lang/en-US.rc [iso-8859-1] Wed Dec 17 10:30:31 2008
@@ -1,0 +1,163 @@
+#pragma code_page(1252)
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ /* Names of code pages */
+ 1250 "1250 (ANSI - Central Europe)"
+ 1251 "1251 (ANSI - Cyrillic)"
+ 1252 "1252 (ANSI - Latin I)"
+ 1253 "1253 (ANSI - Greek)"
+ 1254 "1254 (ANSI - Turkish)"
+ 1255 "1255 (ANSI - Hebrew)"
+ 1256 "1256 (ANSI - Arabic)"
+ 1257 "1257 (ANSI - Baltic)"
+ 1258 "1258 (ANSI/OEM - Viet Nam)"
+ 874 "874 (ANSI/OEM - Thai)"
+ 932 "932 (ANSI/OEM - Japanese Shift-JIS)"
+ 936 "936 (ANSI/OEM - Simplified Chinese GBK)"
+ 949 "949 (ANSI/OEM - Korean)"
+ 950 "950 (ANSI/OEM - Traditional Chinese Big5)"
+
+ 437 "437 (OEM - United States)"
+ 737 "737 (OEM - Greek 437G)"
+ 775 "775 (OEM - Baltic)"
+ 850 "850 (OEM - Multilingual Latin I)"
+ 852 "852 (OEM - Latin II)"
+ 855 "855 (OEM - Cyrillic)"
+ 857 "857 (OEM - Turkish)"
+ 858 "858 (OEM - Multilingual Latin I + Euro)"
+ 860 "860 (OEM - Portuguese)"
+ 861 "861 (OEM - Icelandic)"
+ 862 "862 (OEM - Hebrew)"
+ 863 "863 (OEM - Canadian French)"
+ 864 "864 (OEM - Arabic)"
+ 865 "865 (OEM - Nordic)"
+ 866 "866 (OEM - Russian)"
+ 869 "869 (OEM - Modern Greek)"
+
+ 10000 "10000 (MAC - Roman)"
+ 10001 "10001 (MAC - Japanese)"
+ 10002 "10002 (MAC - Traditional Chinese Big5)"
+ 10003 "10003 (MAC - Korean)"
+ 10004 "10004 (MAC - Arabic)"
+ 10005 "10005 (MAC - Hebrew)"
+ 10006 "10006 (MAC - Greek I)"
+ 10007 "10007 (MAC - Cyrillic)"
+ 10008 "10008 (MAC - Simplified Chinese GB 2312)"
+ 10010 "10010 (MAC - Romania)"
+ 10017 "10017 (MAC - Ukraine)"
+ 10021 "10021 (MAC - Thai)"
+ 10029 "10029 (MAC - Latin II)"
+ 10079 "10079 (MAC - Icelandic)"
+ 10081 "10081 (MAC - Turkish)"
+ 10082 "10082 (MAC - Croatia)"
+
+ 65000 "65000 (UTF-7)"
+ 65001 "65001 (UTF-8)"
+
+ 3700 "37 (IBM EBCDIC - U.S./Canada)" /* FIXME */
+ 1026 "1026 (IBM EBCDIC - Turkish (Latin-5))"
+ 1047 "1047 (IBM EBCDIC - Latin-1/Open System)"
+ 1140 "1140 (IBM EBCDIC - U.S./Canada (37 + Euro))"
+ 1141 "1141 (IBM EBCDIC - Germany (20273 + Euro))"
+ 1142 "1142 (IBM EBCDIC - Denmark/Norway (20277 + Euro))"
+ 1143 "1143 (IBM EBCDIC - Finland/Sweden (20278 + Euro))"
+ 1144 "1144 (IBM EBCDIC - Italy (20280 + Euro))"
+ 1145 "1145 (IBM EBCDIC - Latin America/Spain (20284 + Euro))"
+ 1146 "1146 (IBM EBCDIC - United Kingdom (20285 + Euro))"
+ 1147 "1147 (IBM EBCDIC - France (20297 + Euro))"
+ 1148 "1148 (IBM EBCDIC - International (500 + Euro))"
+ 1149 "1149 (IBM EBCDIC - Icelandic (20871 + Euro))"
+ 20273 "20273 (IBM EBCDIC - Germany)"
+ 20277 "20277 (IBM EBCDIC - Denmark/Norway)"
+ 20278 "20278 (IBM EBCDIC - Finland/Sweden)"
+ 20280 "20280 (IBM EBCDIC - Italy)"
+ 20284 "20284 (IBM EBCDIC - Latin America/Spain)"
+ 20285 "20285 (IBM EBCDIC - United Kingdom)"
+ 20290 "20290 (IBM EBCDIC - Japanese Katakana Extended)"
+ 20297 "20297 (IBM EBCDIC - France)"
+ 20420 "20420 (IBM EBCDIC - Arabic)"
+ 20423 "20423 (IBM EBCDIC - Greek)"
+ 20424 "20424 (IBM EBCDIC - Hebrew)"
+ 20833 "20833 (IBM EBCDIC - Korean Extended)"
+ 20838 "20838 (IBM EBCDIC - Thai)"
+ 20871 "20871 (IBM EBCDIC - Icelandic)"
+ 20880 "20880 (IBM EBCDIC - Cyrillic (Russian))"
+ 20905 "20905 (IBM EBCDIC - Turkish)"
+ 20924 "20924 (IBM EBCDIC - Latin-1/Open System (1047 + Euro))"
+ 21025 "21025 (IBM EBCDIC - Cyrillic (Serbian, Bulgarian))"
+ 500 "500 (IBM EBCDIC - International)"
+ 870 "870 (IBM EBCDIC - Multilingual/ROECE (Latin-2))"
+ 875 "875 (IBM EBCDIC - Modern Greek)"
+
+ 20269 "20269 (ISO 6937 Non-Spacing Accent)"
+ 28591 "28591 (ISO 8859-1 Latin I)"
+ 28592 "28592 (ISO 8859-2 Central Europe)"
+ 28593 "28593 (ISO 8859-3 Latin 3)"
+ 28594 "28594 (ISO 8859-4 Baltic)"
+ 28595 "28595 (ISO 8859-5 Cyrillic)"
+ 28596 "28596 (ISO 8859-6 Arabic)"
+ 28597 "28597 (ISO 8859-7 Greek)"
+ 28598 "28598 (ISO 8859-8 Hebrew: Visual Ordering)"
+ 28599 "28599 (ISO 8859-9 Latin 5)"
+ 28605 "28605 (ISO 8859-15 Latin 9)"
+ 38598 "38598 (ISO 8859-8 Hebrew: Logical Ordering)"
+
+ 20105 "20105 (IA5 IRV International Alphabet No.5)"
+ 20106 "20106 (IA5 German)"
+ 20107 "20107 (IA5 Swedish)"
+ 20108 "20108 (IA5 Norwegian)"
+
+ 1361 "1361 (Korean - Johab)"
+ 20000 "20000 (CNS - Taiwan)"
+ 20001 "20001 (TCA - Taiwan)"
+ 20002 "20002 (Eten - Taiwan)"
+ 20003 "20003 (IBM5550 - Taiwan)"
+ 20004 "20004 (TeleText - Taiwan)"
+ 20005 "20005 (Wang - Taiwan)"
+ 20127 "20127 (US-ASCII)"
+ 20261 "20261 (T.61)"
+ 20866 "20866 (Russian - KOI8)"
+ 21027 "21027 (Ext Alpha Lowercase)"
+ 21866 "21866 (Ukrainian - KOI8-U)"
+ 708 "708 (Arabic - ASMO)"
+ 720 "720 (Arabic - Transparent ASMO)"
+ 20932 "20932 (JIS X 0208-1990 & 0212-1990)"
+ 20936 "20936 (Simplified Chinese GB2312)"
+ 20949 "20949 (Korean Wansung)"
+
+ 57002 "57002 (ISCII Devanagari)"
+ 57003 "57003 (ISCII Bengali)"
+ 57004 "57004 (ISCII Tamil)"
+ 57005 "57005 (ISCII Telugu)"
+ 57006 "57006 (ISCII Assamese)"
+ 57007 "57007 (ISCII Oriya)"
+ 57008 "57008 (ISCII Kannada)"
+ 57009 "57009 (ISCII Malayalam)"
+ 57010 "57010 (ISCII Gujarati)"
+ 57011 "57011 (ISCII Gurmukhi)"
+
+ 50930 "50930 (IBM EBCDIC - Japanese (Katakana) Extended and Japanese)"
+ 50931 "50931 (IBM EBCDIC - US/Canada and Japanese)"
+ 50933 "50933 (IBM EBCDIC - Korean Extended and Korean)"
+ 50935 "50935 (IBM EBCDIC - Simplified Chinese)"
+ 50937 "50937 (IBM EBCDIC - US/Canada and Traditional Chinese)"
+ 50939 "50939 (IBM EBCDIC - Japanese (Latin) Extended and Japanese)"
+
+ 50220 "50220 (ISO-2022 Japanese with no halfwidth Katakana)"
+ 50221 "50221 (ISO-2022 Japanese with halfwidth Katakana)"
+ 50222 "50222 (ISO-2022 Japanese JIS X 0201-1989)"
+ 50225 "50225 (ISO-2022 Korean)"
+ 50227 "50227 (ISO-2022 Simplified Chinese)"
+ 50229 "50229 (ISO-2022 Traditional Chinese)"
+
+ 51932 "51932 (EUC-Japanese)"
+ 51936 "51936 (EUC-Simplified Chinese)"
+ 51949 "51949 (EUC-Korean)"
+ 51950 "51950 (EUC-Traditional Chinese)"
+
+ 52936 "52936 (HZ-GB2312 Simplified Chinese)"
+ 54936 "54936 (GB18030 Simplified Chinese)"
+END
Propchange: trunk/reactos/dll/win32/kernel32/lang/en-US.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/kernel32/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/lang/ru…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/lang/ru-RU.rc (added)
+++ trunk/reactos/dll/win32/kernel32/lang/ru-RU.rc [iso-8859-1] Wed Dec 17 10:30:31 2008
@@ -1,0 +1,163 @@
+#pragma code_page(1251)
+
+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ /* Names of code pages */
+ 1250 "1250 (ANSI - öåíòðàëüíî-åâðîïåéñêàÿ)"
+ 1251 "1251 (ANSI - êèðèëëèöà)"
+ 1252 "1252 (ANSI - ëàòèíèöà 1)"
+ 1253 "1253 (ANSI - ãðå÷åñêàÿ)"
+ 1254 "1254 (ANSI - òóðåöêàÿ)"
+ 1255 "1255 (ANSI - èâðèò)"
+ 1256 "1256 (ANSI - àðàáñêàÿ)"
+ 1257 "1257 (ANSI - áàëòèéñêàÿ)"
+ 1258 "1258 (ANSI/OEM - âüåòíàìñêàÿ)"
+ 874 "874 (ANSI/OEM - òàéñêàÿ)"
+ 932 "932 (ANSI/OEM - ÿïîíñêàÿ Shift-JIS)"
+ 936 "936 (ANSI/OEM - êèòàéñêàÿ óïðîùåííàÿ GBK)"
+ 949 "949 (ANSI/OEM - êîðåéñêàÿ)"
+ 950 "950 (ANSI/OEM - êèòàéñêàÿ òðàäèöèîííàÿ Big5)"
+
+ 437 "437 (OEM - ÑØÀ)"
+ 737 "737 (OEM - ãðå÷åñêàÿ 437G)"
+ 775 "775 (OEM - áàëòèéñêàÿ)"
+ 850 "850 (OEM - ìíîãîÿçû÷íàÿ ëàòèíèöà 1)"
+ 852 "852 (OEM - ëàòèíèöà 2)"
+ 855 "855 (OEM - êèðèëëèöà òðàäèöèîííàÿ)"
+ 857 "857 (OEM - òóðåöêàÿ)"
+ 858 "858 (OEM - ìíîãîÿçû÷íàÿ ëàòèíèöà 1 + Åâðî)"
+ 860 "860 (OEM - ïîðòóãàëüñêàÿ)"
+ 861 "861 (OEM - èñëàíäñêàÿ)"
+ 862 "862 (OEM - èâðèò)"
+ 863 "863 (OEM - ôðàíêî-êàíàäñêàÿ)"
+ 864 "864 (OEM - àðàáñêàÿ)"
+ 865 "865 (OEM - ñêàíäèíàâñêàÿ)"
+ 866 "866 (OEM - ðóññêàÿ)"
+ 869 "869 (OEM - ãðå÷åñêàÿ ñîâðåìåííàÿ)"
+
+ 10000 "10000 (MAC - ëàòèíèöà)"
+ 10001 "10001 (MAC - ÿïîíñêàÿ)"
+ 10002 "10002 (MAC - êèòàéñêàÿ òðàäèöèîííàÿ Big5)"
+ 10003 "10003 (MAC - êîðåéñêàÿ)"
+ 10004 "10004 (MAC - àðàáñêàÿ)"
+ 10005 "10005 (MAC - èâðèò)"
+ 10006 "10006 (MAC - ãðå÷åñêàÿ 1)"
+ 10007 "10007 (MAC - êèðèëëèöà)"
+ 10008 "10008 (MAC - êèòàéñêàÿ óïðîùåííàÿ GB 2312)"
+ 10010 "10010 (MAC - ðóìûíñêàÿ)"
+ 10017 "10017 (MAC - óêðàèíñêàÿ)"
+ 10021 "10021 (MAC - òàéñêàÿ)"
+ 10029 "10029 (MAC - ëàòèíèöà 2)"
+ 10079 "10079 (MAC - èñëàíäñêàÿ)"
+ 10081 "10081 (MAC - òóðåöêàÿ)"
+ 10082 "10082 (MAC - õîðâàòñêàÿ)"
+
+ 65000 "65000 (UTF-7)"
+ 65001 "65001 (UTF-8)"
+
+ 3700 "37 (IBM EBCDIC - ÑØÀ/Êàíàäà)" /* FIXME */
+ 1026 "1026 (IBM EBCDIC - òóðåöêàÿ (ëàòèíèöà-5))"
+ 1047 "1047 (IBM EBCDIC - ëàòèíèöà 1/Open System)"
+ 1140 "1140 (IBM EBCDIC - ÑØÀ/Êàíàäà (37 + åâðî))"
+ 1141 "1141 (IBM EBCDIC - íåìåöêàÿ (20273 + åâðî))"
+ 1142 "1142 (IBM EBCDIC - äàòñêàÿ/íîðâåæñêàÿ (20277 + åâðî))"
+ 1143 "1143 (IBM EBCDIC - ôèíñêàÿ/øâåäñêàÿ (20278 + åâðî))"
+ 1144 "1144 (IBM EBCDIC - èòàëüÿíñêàÿ (20280 + åâðî))"
+ 1145 "1145 (IBM EBCDIC - ëàòèíîàìåð/èñïàíñêàÿ (20284 + åâðî))"
+ 1146 "1146 (IBM EBCDIC - áðèòàíñêàÿ (20285 + åâðî))"
+ 1147 "1147 (IBM EBCDIC - ôðàíöóçñêàÿ (20297 + åâðî))"
+ 1148 "1148 (IBM EBCDIC - ìåæäóíàðîäíàÿ (500 + åâðî))"
+ 1149 "1149 (IBM EBCDIC - èñëàíäñêàÿ (20871 + åâðî))"
+ 20273 "20273 (IBM EBCDIC - íåìåöêàÿ)"
+ 20277 "20277 (IBM EBCDIC - äàòñêàÿ/íîðâåæñêàÿ)"
+ 20278 "20278 (IBM EBCDIC - ôèíñêàÿ/øâåäñêàÿ)"
+ 20280 "20280 (IBM EBCDIC - èòàëüÿíñêàÿ)"
+ 20284 "20284 (IBM EBCDIC - ëàòèíîàìåðèêàíñêàÿ/èñïàíñêàÿ)"
+ 20285 "20285 (IBM EBCDIC - áðèòàíñêàÿ)"
+ 20290 "20290 (IBM EBCDIC - ÿïîíñêàÿ ðàñøèðåííàÿ êàòàêàíà)"
+ 20297 "20297 (IBM EBCDIC - ôðàíöóçñêàÿ)"
+ 20420 "20420 (IBM EBCDIC - àðàáñêàÿ)"
+ 20423 "20423 (IBM EBCDIC - ãðå÷åñêàÿ)"
+ 20424 "20424 (IBM EBCDIC - èâðèò)"
+ 20833 "20833 (IBM EBCDIC - êîðåéñêàÿ ðàñøèðåííàÿ)"
+ 20838 "20838 (IBM EBCDIC - òàéñêàÿ)"
+ 20871 "20871 (IBM EBCDIC - èñëàíäñêàÿ)"
+ 20880 "20880 (IBM EBCDIC - êèðèëëèöà (ðóññêàÿ))"
+ 20905 "20905 (IBM EBCDIC - òóðåöêàÿ)"
+ 20924 "20924 (IBM EBCDIC - ëàòèíèöà 1/Open System (1047 + åâðî))"
+ 21025 "21025 (IBM EBCDIC - êèðèëëèöà (ñåðáñêàÿ, áîëãàðñêàÿ))"
+ 500 "500 (IBM EBCDIC - ìåæäóíàðîäíàÿ)"
+ 870 "870 (IBM EBCDIC - ìíîãîÿçû÷íàÿ/ROECE (ëàòèíèöà-2))"
+ 875 "875 (IBM EBCDIC - ñîâðåìåííàÿ ãðå÷åñêàÿ)"
+
+ 20269 "20269 (ISO 6937 äèàêðèòè÷åñêèå çíàêè)"
+ 28591 "28591 (ISO 8859-1 ëàòèíèöà 1)"
+ 28592 "28592 (ISO 8859-2 öåíòðàëüíîåâðîïåéñêàÿ)"
+ 28593 "28593 (ISO 8859-3 ëàòèíèöà 3)"
+ 28594 "28594 (ISO 8859-4 áàëòèéñêàÿ)"
+ 28595 "28595 (ISO 8859-5 êèðèëëèöà)"
+ 28596 "28596 (ISO 8859-6 àðàáñêàÿ)"
+ 28597 "28597 (ISO 8859-7 ãðå÷åñêàÿ)"
+ 28598 "28598 (ISO 8859-8 èâðèò: âèçóàëüíàÿ ñîðòèðîâêà)"
+ 28599 "28599 (ISO 8859-9 ëàòèíèöà 5)"
+ 28605 "28605 (ISO 8859-15 ëàòèíèöà 9)"
+ 38598 "38598 (ISO 8859-8 èâðèò: ëîãè÷åñêàÿ ñîðòèðîâêà)"
+
+ 20105 "20105 (IA5 IRV ìåæäóíàðîäíûé àëôàâèò ¹5)"
+ 20106 "20106 (IA5 íåìåöêàÿ)"
+ 20107 "20107 (IA5 øâåäñêàÿ)"
+ 20108 "20108 (IA5 íîðâåæñêàÿ)"
+
+ 1361 "1361 (êîðåéñêàÿ - Johab)"
+ 20000 "20000 (CNS - òàéâàíüñêàÿ)"
+ 20001 "20001 (TCA - òàéâàíüñêàÿ)"
+ 20002 "20002 (Eten - òàéâàíüñêàÿ)"
+ 20003 "20003 (IBM5550 - òàéâàíüñêàÿ)"
+ 20004 "20004 (TeleText - òàéâàíüñêàÿ)"
+ 20005 "20005 (Wang - òàéâàíüñêàÿ)"
+ 20127 "20127 (ÑØÀ-ASCII)"
+ 20261 "20261 (T.61)"
+ 20866 "20866 (ðóññêàÿ - ÊÎÈ8)"
+ 21027 "21027 (ðàñø. àëô. íèæíèé ðåãèñòð)"
+ 21866 "21866 (óêðàèíñêàÿ - ÊÎÈ8-U)"
+ 708 "708 (àðàáñêàÿ - ASMO)"
+ 720 "720 (àðàáñêàÿ - ïðîçðà÷íàÿ ASMO)"
+ 20932 "20932 (JIS X 0208-1990 & 0212-1990)"
+ 20936 "20936 (GB2312 êèòàéñêàÿ óïðîùåííàÿ)"
+ 20949 "20949 (Korean Wansung)"
+
+ 57002 "57002 (ISCII äåâàíàãàðè)"
+ 57003 "57003 (ISCII áåíãàëüñêàÿ)"
+ 57004 "57004 (ISCII òàìèëüñêàÿ)"
+ 57005 "57005 (ISCII òåëóãó)"
+ 57006 "57006 (ISCII àññàìñêàÿ)"
+ 57007 "57007 (ISCII îðèÿ)"
+ 57008 "57008 (ISCII êàííàäà)"
+ 57009 "57009 (ISCII ìàëàÿëàì)"
+ 57010 "57010 (ISCII ãóäæàðàòè)"
+ 57011 "57011 (ISCII ãóðìóõè)"
+
+ 50930 "50930 (IBM EBCDIC - ÿïîíñêàÿ (ñ êàòàêàíîé))"
+ 50931 "50931 (IBM EBCDIC - ÑØÀ/Êàíàäà è ÿïîíñêàÿ)"
+ 50933 "50933 (IBM EBCDIC - êîðåéñêàÿ è ðàñøèðåííàÿ êîðåéñêàÿ)"
+ 50935 "50935 (IBM EBCDIC - êèòàéñêàÿ óïðîùåííàÿ)"
+ 50937 "50937 (IBM EBCDIC - ÑØÀ/Êàíàäà è êèòàéñêàÿ òðàäèöèîííàÿ)"
+ 50939 "50939 (IBM EBCDIC - ÿïîíñêàÿ (ëàòèíèöà) ðàñøèðåííàÿ è ÿïîíñêàÿ)"
+
+ 50220 "50220 (ISO-2022 ÿïîíñêàÿ áåç ïîëóøèðèííîé êàòàêàíû)"
+ 50221 "50221 (ISO-2022 ÿïîíñêàÿ ñ ïîëóøèðèííîé êàòàêàíîé)"
+ 50222 "50222 (ISO-2022 ÿïîíñêàÿ JIS X 0201-1989)"
+ 50225 "50225 (ISO-2022 êîðåéñêàÿ)"
+ 50227 "50227 (ISO-2022 êèòàéñêàÿ óïðîùåííàÿ)"
+ 50229 "50229 (ISO-2022 êèòàéñêàÿ òðàäèöèîííàÿ)"
+
+ 51932 "51932 (EUC-ÿïîíñêàÿ)"
+ 51936 "51936 (EUC-êèòàéñêàÿ óïðîùåííàÿ)"
+ 51949 "51949 (EUC-êîðåéñêàÿ)"
+ 51950 "51950 (EUC-êèòàéñêàÿ òðàäèöèîííàÿ)"
+
+ 52936 "52936 (HZ-GB2312 êèòàéñêàÿ óïðîùåííàÿ)"
+ 54936 "54936 (GB18030 êèòàéñêàÿ óïðîùåííàÿ)"
+END
Propchange: trunk/reactos/dll/win32/kernel32/lang/ru-RU.rc
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/kernel32/locale_rc.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/locale_…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/locale_rc.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/locale_rc.rc [iso-8859-1] Wed Dec 17 10:30:31 2008
@@ -246,3 +246,6 @@
//#include "nls/cym.nls" /* 0x0492 LANG_WELSH, SUBLANG_NEUTRAL */
//#include "nls/brf.nls" /* 0x0493 LANG_BRETON, SUBLANG_NEUTRAL */
+
+#include "lang/en-US.rc"
+#include "lang/ru-RU.rc"
Modified: trunk/reactos/dll/win32/kernel32/misc/lang.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/la…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] Wed Dec 17 10:30:31 2008
@@ -1284,6 +1284,53 @@
return TRUE;
}
+static BOOL
+GetLocalisedText(DWORD dwResId, WCHAR *lpszDest)
+{
+ HRSRC hrsrc;
+ LCID lcid;
+ LANGID langId;
+ DWORD dwId;
+
+ if (dwResId == 37)
+ dwId = dwResId * 100;
+ else
+ dwId = dwResId;
+
+ lcid = GetUserDefaultLCID();
+ lcid = ConvertDefaultLocale(lcid);
+
+ langId = LANGIDFROMLCID(lcid);
+
+ if (PRIMARYLANGID(langId) == LANG_NEUTRAL)
+ langId = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US);
+
+ hrsrc = FindResourceExW(hCurrentModule,
+ (LPWSTR)RT_STRING,
+ MAKEINTRESOURCEW((dwId >> 4) + 1),
+ langId);
+ if (hrsrc)
+ {
+ HGLOBAL hmem = LoadResource(hCurrentModule, hrsrc);
+
+ if (hmem)
+ {
+ const WCHAR *p;
+ unsigned int i;
+
+ p = LockResource(hmem);
+ for (i = 0; i < (dwId & 0x0f); i++) p += *p + 1;
+
+ memcpy(lpszDest, p + 1, *p * sizeof(WCHAR));
+ lpszDest[*p] = '\0';
+
+ return TRUE;
+ }
+ }
+
+ DPRINT1("Could not get codepage name. dwResId = %ld\n", dwResId);
+ return FALSE;
+}
/*
* @implemented
@@ -1301,21 +1348,17 @@
{
case CP_UTF7:
{
- static const WCHAR utf7[] = L"Unicode (UTF-7)\0";
-
lpCPInfoEx->CodePage = CP_UTF7;
lpCPInfoEx->UnicodeDefaultChar = 0x3f;
- wcscpy(lpCPInfoEx->CodePageName, utf7);
+ return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName);
}
break;
case CP_UTF8:
{
- static const WCHAR utf8[] = L"Unicode (UTF-8)\0";
-
lpCPInfoEx->CodePage = CP_UTF8;
lpCPInfoEx->UnicodeDefaultChar = 0x3f;
- wcscpy(lpCPInfoEx->CodePageName, utf8);
+ return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName);
}
default:
@@ -1332,14 +1375,10 @@
lpCPInfoEx->CodePage = CodePageEntry->CodePageTable.CodePage;
lpCPInfoEx->UnicodeDefaultChar =
CodePageEntry->CodePageTable.UniDefaultChar;
- /* FIXME: We need to get a codepage name */
- DPRINT1("FIXME: We need to get a codepage name!\n");
- wcscpy(lpCPInfoEx->CodePageName, L"Unknown\0");
+ return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName);
}
break;
}
-
- return TRUE;
}