Implementing multi-lingual user interface
- Posted by Peter Willems <peter at integratedmoves.com> Jul 16, 2003
- 439 views
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 Hans Peter Willems