News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Multilanguage suppport

Started by lamer, March 16, 2006, 09:31:47 PM

Previous topic - Next topic

lamer

Hi all!
I've never created apps with multilanguage support - and now I'm confused how to do that. Theoretically I know there should be Unicode files for each language (actually just INI files) that I read strings from and apply them to controls or menu items. But nothing comes of it :'( I try to use GetPrivateProfileStringW and get either rubbish or nothing. I guess it's rather a simple task - few lines of code will come in handy :bg
Thank you.

ramguru

Hi,
If you want multilanguage user interface the first thing you should do is to save rc files in unicode and to write the same resource in differ. language. f.e.:

10000 MENUEX
LANGUAGE 0x9, 0 //in english
BEGIN
POPUP "Languages",10005
BEGIN
MENUITEM "Change language",10006
END
END

10000 MENUEX
LANGUAGE 0x27, 0 //in lithuanian
BEGIN
POPUP "Kalba",10005
BEGIN
MENUITEM "Keisti kalbą",10006
END
END


The biggest trouble here is to make program use particular language. For menu resource this worked...

.....
.elseif eax==WM_COMMAND
mov    eax, wParam
.if eax == 10006
invoke FindResourceEx, 0, RT_MENU, 10000, 27h
invoke LoadResource,   0, eax
invoke LoadMenuIndirect,  eax
invoke SetMenu,     hWin, eax
.endif
.....

btw try to google "sdk MUI"

pmos

yeah..but something else shows up.

lamer

Hi, ramguru!
I didn't mean resource based MUI, but run-time ability to chose needed language in some combo or listbox (see Radasm-->Options-->Language). You have a unicode INI file like:
[10000]
10006=Keisti kalbą

and maps loaded strings to menu items or controls.