Re: Implementing multi-lingual user interface
- Posted by Derek Parnell <ddparnell at bigpond.com> Jul 16, 2003
- 403 views
----- Original Message ----- From: "Peter Willems" <peter at integratedmoves.com> To: "EUforum" <EUforum at topica.com> Subject: Implementing multi-lingual user interface > > > Hi there, > > I'm only just getting my feet wet with Eu but have already found > some great things. One thing I would like to mention for those > interested: > > In my company we currently use a IDE called WinDev. One of it's > nice features is the ability to implement multi-lingual user > interface. You can simply input all wanted translations for every > control, menu-option, etc. > > As I'm seriously thinking about switching to Eu over a certain > period (and for several reasons) I'm evaluating how to do certain > things in Eu that I can currently do very easy with WinDev. > I found out that creating a multi-lingual interface in Eu is VERY > simple (I only post the control-specific code here, I use > Win32lib): > > --- > atom language_number -- atom to hold the active language > sequence button_text -- sequence to hold all the translations > > language_nuber = 1 -- set to english, 2 will switch to dutch > button_text = {english-txt, dutch-text} -- translations for button > > constant PushButton1 = createEx(PushButton, > button_text[language_number], Window, 120, 200, 150, 20) > > --- > > If you do this for each control, simply setting "language_number" > will run the user interface in the wanted language. > I'm going to extend this with a procedure that can switch languages > at runtime. I must say that the concept of sequences is impressive. > > This trick is probably known already, but if not it might come > handy for someone > You'll be pleased that this 'text' translation feature will be built in to win32lib soon. I have the outline of it working now but there is still a few 'issues' to sort out. So maybe it'll appear in a few weeks, after the next release. I first ran into this technique many many years ago using an IBM mainframe programming language called 'UFO' - User-Files-Online. -- Derek.