Bay Six Software Forum Index Bay Six Software
Beyond the Basics
 
 FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

One idea on localization

 
Post new topic   Reply to topic    Bay Six Software Forum Index -> Inclusive Design
View previous topic :: View next topic  
Author Message
BASICwebmaster
Guest





PostPosted: Aug 17th, 2007, 12:48pm    Post subject: One idea on localization Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Bay Six Software Forum Index -> Inclusive Design All times are GMT
Page 1 of 1
Jump to:  
Quick Reply
Username:
Message:
   Shortcut keys: Alt+Q to activate, Alt+P to preview, Alt+S to submit
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



Lo-Fi Version
Powered by phpBB © 2001, 2005 phpBB Group