flat assembler
Message board for the users of flat assembler.

Index > Windows > multilingual resources from dlls

Author
Thread Post new topic Reply to topic
upsurt



Joined: 14 Jan 2014
Posts: 51
upsurt 01 Dec 2014, 22:10
Hi

I've several DLLs with resources (like res_en.dll, res_fr.dll, res_de.dll, ...)
let's say you start the application on a french system, then it should show the french resources (from res_fr.dll) in the application.

How do I have to include this dlls in my application?
How do I deal with the current language?
Are the DLLs added to the rsrc section or called by an API function?

Can anyone help me?

Thank you

Edit: The DLLs exist already and I've to use them. There is a single DLL for each language.
Post 01 Dec 2014, 22:10
View user's profile Send private message Reply with quote
lucifer



Joined: 24 Nov 2014
Posts: 4
lucifer 02 Dec 2014, 00:21
For multiple languages Windows actually has a feature for GUIs.
http://msdn.microsoft.com/en-us/library/cc194810.aspx

If you want to load DLLs depending on the language then you can use the
GetSystemDefaultUILanguage from kernel32. There are other ways to get it but that's a good start.

Edit: Oops, I actually believe GetUserDefaultUILanguage is the correct function to use if you want to get what language the user is currently using.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd318137%28v=vs.85%29.aspx[/b]


Last edited by lucifer on 03 Dec 2014, 04:03; edited 1 time in total
Post 02 Dec 2014, 00:21
View user's profile Send private message Reply with quote
upsurt



Joined: 14 Jan 2014
Posts: 51
upsurt 02 Dec 2014, 09:35
Thank you, lucifer!

So if I understand it correctly, I've to get the system language by GetSystemDefaultUILanguage and then load the DLL on runtime?!
I guess there is no way to get the needed DLL by an API call with language as param? I've to know that german is in res_de.dll and french is in res_fr.dll - right?

In C# you can declare resources like msg.de.resx, msg.fr.resx (or even msg.fr.FR.resx, msg.fr.CH.resx, msg.fr.BE.resx) and the automatical access the right one by the system language.
Post 02 Dec 2014, 09:35
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.