Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7ae92654
Commit
7ae92654
authored
Oct 17, 1998
by
Juergen Schmied
Committed by
Alexandre Julliard
Oct 17, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed GetLocaleInfo32A for other languages than en_uk.
Made it recognise LOCALE_SYSTEM_DEFAULT, LOCALE_SYSTEM_DEFAULT and last but not least the first argument lcid where is all about...
parent
f4f1719c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
69 deletions
+50
-69
ole2nls.c
ole/ole2nls.c
+50
-69
No files found.
ole/ole2nls.c
View file @
7ae92654
...
...
@@ -414,11 +414,18 @@ INT32 WINAPI GetLocaleInfo32A(LCID lcid,LCTYPE LCType,LPSTR buf,INT32 len)
{
char
*
retString
;
int
found
,
i
;
int
lang
;
int
lang
=
0
;
TRACE
(
ole
,
"(
0x%lx,
0x%lx,%p,%x)
\n
"
,
TRACE
(
ole
,
"(
lcid=0x%lx,lctype=
0x%lx,%p,%x)
\n
"
,
lcid
,
LCType
,
buf
,
len
);
if
(
lcid
==
LOCALE_SYSTEM_DEFAULT
||
(
LCType
&
LOCALE_NOUSEROVERRIDE
)
)
{
lcid
=
GetSystemDefaultLCID
();
}
else
if
(
lcid
==
LOCALE_USER_DEFAULT
)
{
lcid
=
GetUserDefaultLCID
();
}
LCType
&=
~
(
LOCALE_NOUSEROVERRIDE
|
LOCALE_USE_CP_ACP
);
/* As an option, we could obtain the value from win.ini.
...
...
@@ -441,100 +448,71 @@ INT32 WINAPI GetLocaleInfo32A(LCID lcid,LCTYPE LCType,LPSTR buf,INT32 len)
}
#define LOCVAL(type,value) case type:retString=value;found=1;break;
#define LANG_BEGIN(l,s) case MAKELANGID(l,s): switch (LCType) {
#define LANG_END default: found=0; break; } break;
/* Now, the language specific definitions. They don't have to be
complete */
found
=
0
;
i
=
0
;
do
{
if
(
i
==
0
)
lang
=
Languages
[
Options
.
language
].
langid
;
if
(
i
==
1
)
lang
=
MAKELANGID
(
PRIMARYLANGID
(
lang
),
SUBLANG_DEFAULT
);
i
++
;
found
=
0
;
i
=
0
;
lang
=
lcid
;
if
(
lang
==
0x400
)
/*LANG_NEUTRAL ==> US English*/
{
lang
=
0x409
;
WARN
(
ole
,
"no language set, assume LANG_ENGLISH_US
\n
"
);
}
do
{
switch
(
lang
)
{
switch
(
lang
)
{
case
LANG_De
:
switch
(
LCType
)
{
LANG_BEGIN
(
LANG_GERMAN
,
SUBLANG_GERMAN
)
/*0x407*/
#include "nls/deu.nls"
default:
found
=
0
;
break
;
}
break
;
/* LANG(De) */
LANG_END
case
LANG_Da
:
switch
(
LCType
)
{
LANG_BEGIN
(
LANG_DANISH
,
SUBLANG_DEFAULT
)
/*0x406*/
#include "nls/dan.nls"
default:
found
=
0
;
break
;
}
break
;
/* LANG(Da) */
LANG_END
case
LANG_En
:
switch
(
LCType
)
{
LANG_BEGIN
(
LANG_ENGLISH
,
SUBLANG_ENGLISH_US
)
/*0x409*/
#include "nls/enu.nls"
default:
found
=
0
;
break
;
}
break
;
/* LANG(En) */
LANG_END
case
LANG_Eo
:
switch
(
LCType
)
{
LANG_BEGIN
(
LANG_ESPERANTO
,
SUBLANG_DEFAULT
)
/*0x48f*/
#include "nls/esperanto.nls"
default:
found
=
0
;
break
;
}
break
;
/* LANG(Eo) */
LANG_END
case
LANG_Fi
:
switch
(
LCType
)
{
LANG_BEGIN
(
LANG_FINNISH
,
SUBLANG_DEFAULT
)
/*0x040B*/
#include "nls/fin.nls"
default:
found
=
0
;
break
;
}
break
;
/* LANG(Fi) */
LANG_END
case
LANG_It
:
switch
(
LCType
)
{
LANG_BEGIN
(
LANG_ITALIAN
,
SUBLANG_ITALIAN
)
/*0x410*/
#include "nls/ita.nls"
default:
found
=
0
;
break
;
}
break
;
/* LANG(It) */
LANG_END
case
0x0809
:
switch
(
LCType
)
{
LANG_BEGIN
(
LANG_ENGLISH
,
SUBLANG_ENGLISH_UK
)
/*0x809*/
#include "nls/eng.nls"
default:
found
=
0
;
break
;
}
break
;
/* LANG(0x0809) (U.K. English) */
LANG_END
case
LANG_Ko
:
/* string using codepage 949 */
switch
(
LCType
)
{
LANG_BEGIN
(
LANG_KOREAN
,
SUBLANG_KOREAN
)
/*0x412*/
#include "nls/kor.nls"
default:
found
=
0
;
break
;
}
break
;
/* LANG(Ko) */
LANG_END
case
LANG_Hu
:
switch
(
LCType
)
{
LANG_BEGIN
(
LANG_HUNGARIAN
,
SUBLANG_DEFAULT
)
/*0x40e*/
#include "nls/hun.nls"
default:
found
=
0
;
break
;
}
break
;
/* LANG(En) */
LANG_END
case
LANG_Pl
:
switch
(
LCType
)
{
LANG_BEGIN
(
LANG_POLISH
,
SUBLANG_DEFAULT
)
/*0x415*/
#include "nls/plk.nls"
default:
found
=
0
;
break
;
}
break
;
/* LANG(Pl) */
LANG_END
case
LANG_Pt
:
switch
(
LCType
)
{
LANG_BEGIN
(
LANG_PORTUGUESE
,
SUBLANG_PORTUGUESE_BRAZILIAN
)
/*0x416*/
#include "nls/ptb.nls"
default:
found
=
0
;
break
;
}
break
;
/* LANG(Pt) */
LANG_END
case
LANG_Sv
:
switch
(
LCType
)
{
LANG_BEGIN
(
LANG_SWEDISH
,
SUBLANG_DEFAULT
)
/*0x41d*/
#include "nls/sve.nls"
default:
found
=
0
;
break
;
}
break
;
/* LANG(Sv) */
LANG_END
/*Insert other languages here*/
...
...
@@ -542,13 +520,16 @@ INT32 WINAPI GetLocaleInfo32A(LCID lcid,LCTYPE LCType,LPSTR buf,INT32 len)
found
=
0
;
break
;
}
/* switch */
/* language not found, try without a sublanguage*/
lang
=
MAKELANGID
(
PRIMARYLANGID
(
lang
),
SUBLANG_DEFAULT
);
i
++
;
}
while
(
!
found
&&
i
<
2
);
if
(
!
found
)
{
ERR
(
ole
,
"'%s' not supported for your language.
\n
"
,
retString
);
retString
=
"<WINE-NLS-unknown>"
;
/*return 0;*/
}
if
(
buf
)
lstrcpyn32A
(
buf
,
retString
,
len
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment