I have written a program and it can be translated. There is a text file with numbered lines. This file is loaded and split into an array of each line. The caption of each command button, label, etc is set to a specific line using a function when the form/usercontrol is initialized. I have some users asking if it is possible to add support for chinese characters.
How can I load unicode strings from a text file, and set them to be a function result, so they then become the control's caption?
Reading text into VB in Unicode is easy enough since VB uses Unicode internally for its string. However, you won't be able to load these strings into the default VB controls. Microsoft's default controls only support ANSI text, so the Unicode will never display correctly. To get something like this to work, you can use Microsoft's Forms 2 Object (though you cannot distribute it), or you can purchase a 3rd party control that will allow you to print the data. Actually, just a minute.....I have a book by Michael Kaplan called Internationalization with Visual Basic. In Chapter 8, Handling VB Forms and Formats, there is a section on extending the default VB controls. I'm attaching a project that demonstrates how one would extend the label control to include unicode text. I tend to forget about this book, but it is very good and one that I consult a lot when I'm doing projects that require localization.