Hi! everyone:
Now I wanna add multilanguage support in my win32asm program, I know I can add multilanguage resource or create individual ini files to keep corresponding languange, but I have no experience how to do that? can someone give some demo code, it's better to include menu and dialog's multilanguage support
Thx!

dREAMtHEATER
Posted on 2002-04-22 01:18:39 by dREAMtHEATER
I would do that using string table resources...
In dll (each for a separate langage) or in the exe itself...
It is more "secure" than a simple ini files that can be edited with notepad, and faster...

PS : Did you receive my PM ?
Thanks.
Posted on 2002-04-22 02:13:07 by JCP
Hi! Readiosys:
Sorry, I just seen the PM, and give u a reply, please check ur PM, if u don't receive, tell me!
Have u the ready-made demo snippet code about multilanguage support, if u can send me a copy, I'll greatly appreciate your timely help.
Thanks!

dREAMtHEATER

dreamtheater@263.net
Posted on 2002-04-22 06:04:41 by dREAMtHEATER
Sorry, I didn't had to develop multi-langage applications yet, so I speak in theory, but it should be simple :

GetLocaleInfo() to retrieve the OS langage...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_34rz.asp

and to switch to the appropriate langage string table, and LoadString to retrieve each string...

PS : Thanks for the PM. ;)
Posted on 2002-04-23 01:16:22 by JCP
string resources and LoadString is the "official" way of doing it.
It works pretty well, but I find it annoying that I have to load all
strings into buffers and icky pooh. In the commercial app I've worked
on, we took another approach. Our own "stringfile". The format is
very simple. A header with an ID and the number of stirngs, then
a block of StringID,offset pairs, and finally all the raw strings in one
big chunk. Runtime, the whole file is loaded into memory, and the
memory block base is added to the string offsets, so they can be
used directly as pointers. We sort the string by IDs, so lookups can
be done very fast with a binary search. We have a couple methods
for getting a string, one returns a pointer (and allows for very
comfortable coding when you don't need to modify the strings),
another duplicates the string into a new buffer.

What to choose is up to you, the stringfile approach was best for
us.
Posted on 2002-04-23 09:43:59 by f0dder
I made an app one day (it took several day in fact, and it's not finished, and I won't finish it I think).

It uses LoadString (not all strings are loaded at the start of the prog, they are called when needed).
you can select the language from a menu (where you check the wanted language) then it saves that in a ini file.

If you wan't some code, contact me, because the prog can make Windows crash so I won't distribute it here (and it's not available on my site too).

(if you want to contact me, do it via mail at Thomas-Vidal@wanadoo.fr because I've not the occasion to go here all the time)

thanks.
Posted on 2002-04-23 10:44:53 by Vom-bonjour:-()
Dear Vom-bonjour:
I'm dREAMtHEATER, I posted a message that looking for
the multilanguage demo code and your reply give me a chance
to realize the function, can you send me the demo code, if
you can, I'll greatly appreciate your timely help.
Sorry for my bad English!

Best Regards

dREAMtHEATER
dreamtheater@263.net
clone@371.net


I made an app one day (it took several day in fact, and it's not finished, and I won't finish it I think).

It uses LoadString (not all strings are loaded at the start of the prog, they are called when needed).
you can select the language from a menu (where you check the wanted language) then it saves that in a ini file.

If you wan't some code, contact me, because the prog can make Windows crash so I won't distribute it here (and it's not available on my site too).

(if you want to contact me, do it via mail at Thomas-Vidal@wanadoo.fr because I've not the occasion to go here all the time)

thanks.
Posted on 2002-04-23 23:36:11 by dREAMtHEATER
http://www.vombonjour.fr.st

just go here on my homepage, I made a prog that should help you that afternoon...
Posted on 2002-04-24 16:20:07 by Vom-bonjour:-()