|
Bay Six Software Beyond the Basics
|
View previous topic :: View next topic |
Author |
Message |
BASICwebmaster Guest
|
Posted: Aug 17th, 2007, 12:48pm Post subject: One idea on localization |
|
|
I've been working the kinks out of this the past few weeks....
Basically, the idea is to construct menus dynamically via API, instead of changing the text at runtime. Since we can use variables for calling APIs, we can the localize everything based on the user's selection. A little rigged function, called mnuText$(), can be called with a pattern (say, "File.New"), and returns the text for the menu item File->New, by in turn calling GetPrivateProfileString(). WMLiberty is used to trap WM_COMMAND messages and forward them to appropriate action handlers.
To make everything more-or-less Vista-compliant, the use's language choice is stored in the app's Application Data directory. Still using INI files, though. At this point, XML might be 'better', but if it ain't broke.... At any rate, using some more WMLiberty magic, we can also add customizable hotkeys using basically the same technique.
Hope this is coherent and perhaps useful! |
|
Back to top |
|
|
|
|
|
|
|
You can post new topics in this forum You can 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
|
|