English
Forum

Multilanguage in DLLs

 
- Page 1 -



Stephan
Sonneborn
Hello together,

has someone of you Experience with Multilanguage-DLLs? I have in a Program the yet with complete unterschiedlichen DLLs resolved (means a with Texten in german, a in english, a in ...) This is by the management since very costly.
into DLLs can Yes a Language mitgeben. How can I The then in the program zuordnen? i think, is windows automatically make: one englisches windows becomes then The english Texts reading. but there's Yes alone for english x different Language Settings, which ought to one into DLL to put?

Can too in a german windows english Texts use?

82 kB
Hochgeladen:10/04/11
Downloadcounter202
Download
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
10/04/11  
 



« this Posting watts as Solution marked. »


Andreas
Miethe


the Umstellen on another Language is really right simply.
thereafter is the loading the Resources always same, alike which Language.

here time an example (functions only on NT-Systemen )

Download

530 kB
Hochgeladen:10/15/11
Downloadcounter272
Download
 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
10/15/11  
 



Yes, Multi-Language-Strings read goes z.B. with the API FindResourceEx. an further Possibility (Enum) shows this Code me: [...] 

with the LemonEd exists since new The Possibility, too multi-language-Strings directly in The Own Exe incorporate, by RC-Script or compiled as RES.
 
10/04/11  
 




Stephan
Sonneborn
Hello Frank,

thanks for your response and your example. so must I time something accurate keep busy...

is it because fundamentally so, that one The Strings then once with the english Sprachcode and once with the german Sprachcode under of/ one ID in the DLL take off can?
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
10/05/11  
 



i think Yes, made have I it yourself not yet. but Versioninfos and icons I had testweise in several Languages installed, the works correct. for my editor I had tested, one the XProfanicons To supplant and me gewundert, that it in the Exe still still the originale Icon displayed has. To me noticed is, that with Nichtangabe of/ one Language in the Scriptfile german  installed becomes, during the Profanicon neutral  installed is. having then nachgesehen and the Icon twice vorgefunden. as i as Language then neutral taken having, klappte it correctly. and the Icon watts supplant.
so becomes the too with the Stringresourcen his, otherwise would The whole Language-distinction Yes futile his. You can The Texts in many Languages at the same time install and at Abrufen later with the Language-ID to determine, in which Language the String loaded becomes.
 
10/05/11  
 




H.Brill
goes it here only therefore, Menüeinträge or Buttons on The
jeweilige Language To Change ?
If not To many Entries are, would I it simply
with reaches# and Franks XProfan_Datengenerator make.
one can Yes a Menüeintrag to Umstellung german/english
make. because it me too interested, have I time a german.txt
and a english.txt with the editor laid out and the Generator
Translated. The strings get one Yes slight again :
CompileMarkSeparation
Cls
Declare Deutsch#, Englisch#,Eintrag$, position%, pos2%
Dim Deutsch#,32
Dim Englisch#,24
Clear Deutsch#
Clear Englisch#
Long Deutsch#,0=1702125892,1725332585,1852141158,1701860220,1701340009,1232891506,225404526,10
Long Englisch#,0=1701603654,1701859196,1632861294,1216111990,1869376613,2573
Print String$(Deutsch#,0)
Print String$(Englisch#, 0)
Waitkey
Dispose Deutsch#, Englisch#
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
10/06/11  
 



disadvantage is, that The Texe so not any more slight editierbar are...

Have the time tested, its no trouble, Strings mehrsprachig into Own Exe incorporate. my Testscript (RC) to:

LANGUAGE 0, SUBLANG_NEUTRAL
STRINGTABLE
{
1000, "Good morning"
1001, "How are you?"
}

LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
STRINGTABLE
{
1000, "Guten Morgen"
1001, "Wie goes it to you?"
}

 
10/06/11  
 




Stephan
Sonneborn
I Key me time slow ran:
If I a defined Language take on wants, must I through FindResourceEx the lever on The DLL, a Zeiger on the ResourcenTyp, a Zeiger on The ID inside the Resourcentyps and the Language mitgeben.
means altogether 4 Parameter:
CompileMarkSeparation
DEF FindResourceEx(4) !"System-Dll-Name2.dll", "FindResoureceEx"
>

but in which system-DLL find I The FindResourceEx-function?

around the Language as ID To transfer, power The function MakeLangID() from whom Klartexten (z.B. "LANG_GERMAN" and "SUBLANG_GERMAN") a ID.
CompileMarkSeparation
DEF MakeLangID(2) !"System-Dll-Name2.dll", "MakeLangID"
>

too position the question: which system-DLL position The MakeLangID available?
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
10/09/11  
 




Detlef
Jagolski
in the Kernel32.
CompileMarkSeparation
Def FindResourceEx(4) !"KERNEL32","FindResourceExA"
>

from the API Help:

The MAKELANGID macro creates a language identifier from a primary language identifier and a sublanguage identifier.

WORD MAKELANGID(

USHORT usPrimaryLanguage,// primary language identifier
USHORT usSubLanguage// sublanguage identifier
);

Parameters

usPrimaryLanguage

Specifies the primary language identifier. Diese parameter can be one of the following values:

LANG_AFRIKAANSLANG_ICELANDIC
LANG_ALBANIANLANG_INDONESIAN
LANG_ARABICLANG_ITALIAN
LANG_BASQUELANG_JAPANESE
LANG_BELARUSIANLANG_KOREAN
LANG_BULGARIANLANG_LATVIAN
LANG_CATALANLANG_LITHUANIAN
LANG_CHINESELANG_NEUTRAL
LANG_CROATIANLANG_NORWEGIAN
LANG_CZECHLANG_POLISH
LANG_DANISHLANG_PORTUGUESE
LANG_DUTCHLANG_ROMANIAN
LANG_ENGLISHLANG_RUSSIAN
LANG_ESTONIANLANG_SERBIAN
LANG_FAEROESELANG_SLOVAK
LANG_FARSILANG_SLOVENIAN
LANG_FINNISHLANG_SPANISH
LANG_FRENCHLANG_SWEDISH
LANG_GERMANLANG_THAI
LANG_GREEKLANG_TURKISH
LANG_HEBREWLANG_UKRANIAN
LANG_HUNGARIANLANG_VIETNAMESE

For a user-defined language, usPrimaryLanguage can be a value in the brat 0x0200 to 0x03FF. All other values are reserved for system use.

usSubLanguage

Specifies the sublanguage identifier. Diese parameter can be one of the following values:

SUBLANG_ARABIC_SAUDI_ARABIASUBLANG_GERMAN
SUBLANG_ARABIC_IRAQSUBLANG_GERMAN_SWISS
SUBLANG_ARABIC_EGYPTSUBLANG_GERMAN_AUSTRIAN
SUBLANG_ARABIC_LIBYASUBLANG_GERMAN_LUXEMBOURG
SUBLANG_ARABIC_ALGERIASUBLANG_GERMAN_LIECHTENSTEIN
SUBLANG_ARABIC_MOROCCOSUBLANG_ITALIAN
SUBLANG_ARABIC_TUNISIASUBLANG_ITALIAN_SWISS
SUBLANG_ARABIC_OMANSUBLANG_KOREAN
SUBLANG_ARABIC_YEMENSUBLANG_KOREAN_JOHAB
SUBLANG_ARABIC_SYRIASUBLANG_NEUTRAL
SUBLANG_ARABIC_JORDANSUBLANG_NORWEGIAN_BOKMAL
SUBLANG_ARABIC_LEBANONSUBLANG_NORWEGIAN_NYNORSK
SUBLANG_ARABIC_KUWAITSUBLANG_PORTUGUESE
SUBLANG_ARABIC_UAESUBLANG_PORTUGUESE_BRAZILIAN
SUBLANG_ARABIC_BAHRAINSUBLANG_SERBIAN_LATIN
SUBLANG_ARABIC_QATARSUBLANG_SERBIAN_CYRILLIC
SUBLANG_CHINESE_TRADITIONALSUBLANG_SPANISH
SUBLANG_CHINESE_SIMPLIFIEDSUBLANG_SPANISH_MEXICAN
SUBLANG_CHINESE_HONGKONGSUBLANG_SPANISH_MODERN
SUBLANG_CHINESE_SINGAPORESUBLANG_SPANISH_GUATEMALA
SUBLANG_DEFAULTSUBLANG_SPANISH_COSTA_RICA
SUBLANG_DUTCHSUBLANG_SPANISH_PANAMA
SUBLANG_DUTCH_BELGIANSUBLANG_SPANISH_DOMINICAN_
REPUBLIC
SUBLANG_ENGLISH_USSUBLANG_SPANISH_VENEZUELA
SUBLANG_ENGLISH_UKSUBLANG_SPANISH_COLOMBIA
SUBLANG_ENGLISH_AUSSUBLANG_SPANISH_PERU
SUBLANG_ENGLISH_CANSUBLANG_SPANISH_ARGENTINA
SUBLANG_ENGLISH_NZSUBLANG_SPANISH_ECUADOR
SUBLANG_ENGLISH_EIRESUBLANG_SPANISH_CHILE
SUBLANG_ENGLISH_SOUTH_
AFRICASUBLANG_SPANISH_URUGUAY
SUBLANG_ENGLISH_JAMAICASUBLANG_SPANISH_PARAGUAY
SUBLANG_ENGLISH_CARIBBEANSUBLANG_SPANISH_BOLIVIA
SUBLANG_ENGLISH_BELIZESUBLANG_SPANISH_EL_SALVADOR
SUBLANG_ENGLISH_TRINIDADSUBLANG_SPANISH_HONDURAS
SUBLANG_FRENCHSUBLANG_SPANISH_NICARAGUA
SUBLANG_FRENCH_BELGIANSUBLANG_SPANISH_PUERTO_RICO
SUBLANG_FRENCH_CANADIANSUBLANG_SWEDISH
SUBLANG_FRENCH_SWISSSUBLANG_SWEDISH_FINLAND
SUBLANG_FRENCH_LUXEMBOURGSUBLANG_SYS_DEFAULT

For a user-defined sublanguage, usSubLanguage can be a value in the brat 0x20 to 0x3F. All other values are reserved for system use.

Return Values

The return value is a language identifier.

Remarks

The following three combinations of usPrimaryLanguage and usSubLanguage have special meaning:

Primary language IDSublanguage IDMeaning
LANG_NEUTRALSUBLANG_NEUTRALLanguage neutral
LANG_NEUTRALSUBLANG_DEFAULTUser default language
LANG_NEUTRALSUBLANG_SYS_DEFAULTsystem default language

The MAKELANGID macro is defined as follows:

#define MAKELANGID(p, s) ((((WORD) (s)) << 10) | (WORD) (p))
CompileMarkSeparation
Def &SUBLANG_ARABIC_ALGERIA  5
Def &SUBLANG_ARABIC_BAHRAIN  15
Def &SUBLANG_ARABIC_EGYPT  3
Def &SUBLANG_ARABIC_IRAQ  2
Def &SUBLANG_ARABIC_JORDAN  11
Def &SUBLANG_ARABIC_KUWAIT  13
Def &SUBLANG_ARABIC_LEBANON  12
Def &SUBLANG_ARABIC_LIBYA  4
Def &SUBLANG_ARABIC_MOROCCO  6
Def &SUBLANG_ARABIC_OMAN  8
Def &SUBLANG_ARABIC_QATAR  16
Def &SUBLANG_ARABIC_SAUDI_ARABIA  1
Def &SUBLANG_ARABIC_SYRIA  10
Def &SUBLANG_ARABIC_TUNISIA  7
Def &SUBLANG_ARABIC_UAE  14
Def &SUBLANG_ARABIC_YEMEN  9
Def &SUBLANG_CHINESE_HONGKONG  3
Def &SUBLANG_CHINESE_SIMPLIFIED  2
Def &SUBLANG_CHINESE_SINGAPORE  4
Def &SUBLANG_CHINESE_TRADITIONAL  1
Def &SUBLANG_DEFAULT  1
Def &SUBLANG_DUTCH  1
Def &SUBLANG_DUTCH_BELGIAN  2
Def &SUBLANG_ENGLISH_AUS  3
Def &SUBLANG_ENGLISH_BELIZE  10
Def &SUBLANG_ENGLISH_CAN  4
Def &SUBLANG_ENGLISH_CARIBBEAN  9
Def &SUBLANG_ENGLISH_EIRE  6
Def &SUBLANG_ENGLISH_JAMAICA  8
Def &SUBLANG_ENGLISH_NZ  5
Def &SUBLANG_ENGLISH_SOUTH_AFRICA  7
Def &SUBLANG_ENGLISH_TRINIDAD  11
Def &SUBLANG_ENGLISH_UK  2
Def &SUBLANG_ENGLISH_US  1
Def &SUBLANG_FRENCH  1
Def &SUBLANG_FRENCH_BELGIAN  2
Def &SUBLANG_FRENCH_CANADIAN  3
Def &SUBLANG_FRENCH_LUXEMBOURG  5
Def &SUBLANG_FRENCH_SWISS  4
Def &SUBLANG_GERMAN  1
Def &SUBLANG_GERMAN_AUSTRIAN  3
Def &SUBLANG_GERMAN_LIECHTENSTEIN  5
Def &SUBLANG_GERMAN_LUXEMBOURG  4
Def &SUBLANG_GERMAN_SWISS  2
Def &SUBLANG_ITALIAN  1
Def &SUBLANG_ITALIAN_SWISS  2
Def &SUBLANG_KOREAN  1
Def &SUBLANG_KOREAN_JOHAB  2
Def &SUBLANG_NEUTRAL  0
Def &SUBLANG_NORWEGIAN_BOKMAL  1
Def &SUBLANG_NORWEGIAN_NYNORSK  2
Def &SUBLANG_PORTUGUESE  2
Def &SUBLANG_PORTUGUESE_BRAZILIAN  1
Def &SUBLANG_SERBIAN_CYRILLIC  3
Def &SUBLANG_SERBIAN_LATIN  2
Def &SUBLANG_SPANISH  1
Def &SUBLANG_SPANISH_ARGENTINA  11
Def &SUBLANG_SPANISH_BOLIVIA  16
Def &SUBLANG_SPANISH_CHILE  13
Def &SUBLANG_SPANISH_COLOMBIA  9
Def &SUBLANG_SPANISH_COSTA_RICA  5
Def &SUBLANG_SPANISH_DOMINICAN_REPUBLIC  7
Def &SUBLANG_SPANISH_ECUADOR  12
Def &SUBLANG_SPANISH_EL_SALVADOR  17
Def &SUBLANG_SPANISH_GUATEMALA  4
Def &SUBLANG_SPANISH_HONDURAS  18
Def &SUBLANG_SPANISH_MEXICAN  2
Def &SUBLANG_SPANISH_MODERN  3
Def &SUBLANG_SPANISH_NICARAGUA  19
Def &SUBLANG_SPANISH_PANAMA  6
Def &SUBLANG_SPANISH_PARAGUAY  15
Def &SUBLANG_SPANISH_PERU  10
Def &SUBLANG_SPANISH_PUERTO_RICO  20
Def &SUBLANG_SPANISH_URUGUAY  14
Def &SUBLANG_SPANISH_VENEZUELA  8
Def &SUBLANG_SWEDISH  1
Def &SUBLANG_SWEDISH_FINLAND  2
Def &SUBLANG_SYS_DEFAULT  2
Def &LANG_AFRIKAANS  54
Def &LANG_ALBANIAN  28
Def &LANG_ARABIC  1
Def &LANG_BASQUE  45
Def &LANG_BELARUSIAN  35
Def &LANG_BULGARIAN  2
Def &LANG_CATALAN  3
Def &LANG_CHINESE  4
Def &LANG_CROATIAN  26
Def &LANG_CZECH  5
Def &LANG_DANISH  6
Def &LANG_DUTCH  19
Def &LANG_ENGLISH  9
Def &LANG_ESTONIAN  37
Def &LANG_FAEROESE  56
Def &LANG_FARSI  41
Def &LANG_FINNISH  11
Def &LANG_FRENCH  12
Def &LANG_GERMAN  7
Def &LANG_GREEK  8
Def &LANG_HEBREW  13
Def &LANG_HUNGARIAN  14
Def &LANG_ICELANDIC  15
Def &LANG_INDONESIAN  33
Def &LANG_ITALIAN  16
Def &LANG_JAPANESE  17
Def &LANG_KOREAN  18
Def &LANG_LATVIAN  38
Def &LANG_LITHUANIAN  39
Def &LANG_NEUTRAL  0
Def &LANG_NORWEGIAN  20
Def &LANG_POLISH  21
Def &LANG_PORTUGUESE  22
Def &LANG_ROMANIAN  24
Def &LANG_RUSSIAN  25
Def &LANG_SERBIAN  26
Def &LANG_SLOVAK  27
Def &LANG_SLOVENIAN  36
Def &LANG_SPANISH  10
Def &LANG_SWEDISH  29
Def &LANG_SYSTEM_DEFAULT  2048
Def &LANG_THAI  30
Def &LANG_TURKISH  31
Def &LANG_UKRAINIAN  34
Def &LANG_USER_DEFAULT  1024
Def &LANG_VIETNAMESE  42
Declare  MAKELANGID#
Dim MAKELANGID#,4
Word MAKELANGID#,0 = &LANG_GERMAN, &SUBLANG_GERMAN
Dispose MAKELANGID#
FindResourceEx(hModule,lpType,lpName,wLanguage(MAKELANGID#))
 
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
10/09/11  
 




Andreas
Miethe


And so geht's kürzer :
CompileMarkSeparation
 $H windows.ph
DEF MakeLangID(2) (@&(2) << 10) | @&(1)
cls
Print MakeLangID(~LANG_GERMAN,~SUBLANG_GERMAN)
waitinput
en
 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
10/09/11  
 




Detlef
Jagolski
what about me thought The Solution of Andreas declared itself through

The MAKELANGID macro is defined as follows:

#define MAKELANGID(p, s) ((((WORD) (s)) << 10) | (WORD) (p))


from alone.
 
XProfan X2
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
10/09/11  
 




Stephan
Sonneborn
Hello Detlef, Hello Andreas,
many Thanks for Your Help, but somehow stand I still aufm Hose:
I Have a DLL gebastelt with of/ one STRING-Resource into Sprachcodes neutral, GERMAN and ENGLISH.

In all dreien have I Texts hinterlegt:
100,Neutral; 100,Deutsch; 100,English

Through
CompileMarkSeparationwished I then on The Texts grab.How should because the Pointer "PointerAufID" looks?
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
10/10/11  
 




Detlef
Jagolski
from the API Using FindResourceEX:

Points to a zero-terminated string specifying the name of the resource. For more information, sea the Remarks section.

CompileMarkSeparation
var PointerAufID$ = "Name der Resource" + Chr$(0)
FindResourceEX(DllName&, ~RT_STRING,Addr(PointerAufID$), MAKELANGID(~Neutral, ~SUBLANG_Neutral))e>

Greeting

Detlef
 
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
10/11/11  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

19.746 Views

Untitledvor 0 min.
Kutsche02/27/20
Stephan Sonneborn10/31/19
Walter02/06/18
Boroberto04/22/16
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie