Here's a demo project that stores captions and text in XML files. One file per language. The XML format of each file is identical.
When you switch language in your app a new file is loaded and the captions of buttons and the text of other controls can easily be changed.
Regards,
Woof
Last edited by Wokawidget; Aug 27th, 2004 at 03:21 AM.
Hi Woka. I am digging this idea to implement language. I can imagine that you could store msgbox text and maybe write a program to parse your .frm file to gather the control names, caption/text values etc. and automate at least the English XML (or whatever language you're writing in!)
I just wanted to tell you something and I hope that replying to your post is appropriate. I have never been in the code bank before.
In frmMain.SelectCurrentLanguage, there is a typo where you set the combo box language. It says
If cboLanguage.ItemData(lngIndex) = lngDefault Then
cboLanguage.ListIndex = lngDefault
Exit For
End If
But you probably meant:
If cboLanguage.ItemData(lngIndex) = lngDefault Then
cboLanguage.ListIndex = lngIndex
Exit For
End If
U can store text for msgbox's, labels, filenames and other random text.
Yea, it should be too hard to automate it. Just a small function ijn a module that looks at controls on a form. Not rocket science.
I have just had a thought. This could be used as an ini file, could do with a write command...Hmmmm.
Re: Multilanguage support for application using XML
I got an error... "ActiveX control couldn't create..." that kinda thing... Number 91 I think... Don't have VB installed at the moment so I don't remember what it was exactly? Any idea? The reference was OK
Has someone helped you? Then you can Rate their helpful post.
Re: Multilanguage support for application using XML
Hi all, im new here I'm VB6 user and I'm trying to build multilanguage app using Woka's demo but i have an issue with Cyrillic characters - instead of "вщь" i can see only "???". Other languages like polish (with ł,ą,ę etc ) or english works fine. Thanks for replays.
Last edited by grzechog; Oct 27th, 2009 at 04:29 AM.
Re: Multilanguage support for application using XML
Hello
yes this is very old, but I'm very interested in multilanguage support.
I'm here to ask if anyone has implemented this (using XML-like technique)
I've looked at ways that use the resource file but it seems to me that this method is better.
I also took a quick look at the Tanner method which seems the best although quite complicated.
First it scans the project by looking for strings and create the master.xml file https://github.com/tannerhelland/Pho...ML%20generator
Then, from what I understand, in the main project, every time a string must be displayed, function g_Language.TranslateMessage is called, so that the string is translated using the XML file of the selected language.
Apart from this, I'm very interested in every kind of solution.
Do you have any ideas?
Do you have already implemented multilanguage application?
I would be very grateful if you can post some examples
Last edited by reexre; Feb 26th, 2019 at 08:39 AM.