Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Foreign language issues 1

Status
Not open for further replies.

Glasgow

IS-IT--Management
Jul 30, 2001
1,669
0
0
GB
I am looking into the implications of supporting foreign languages within our applications. I have explored the resource (.res) file concept and we may well choose to use this approach to handle messages, captions etc.

However, what happens with the text that cannot be controlled directly by VB code = e.g.:

MsgBox LoadResString(DoYouSpeakFrench), vbYesNo

Will the message box still display "Yes" and "No" as options to the user or will it display "Oui" and "Non" i.e. is this fixed or is it controlled by regional settings in control panel?

Thanks in advance.
 
Msgbox button captions will be in the language of the O/S. It's just as you say, you only need to handle strings generated by your own code.

Paul Bent
Northwind IT Systems
 
OK Paul, thanks.

I was somewhat naiively attempting to change everything I could find in Control Panel to French but my application still displayed 'Yes' and 'No'. However, assuming I understand correctly, I would have to order a separate copy of the operating system to experiment with this - i.e. Windows XP (French) assuming such a thing exists.

If you get a moment to confirm this I would appreciate it.

Thanks again.
 
I have done exactly this when developing my applications to support multilang language.

You can do basic testing on things like decimal points etc. by changing the regional and keyboard settings to the appropriate language - but I do suggest testing on a proper version of the foreign language O.S. to be sure. It certainly helped me.

I use a satellite DLL active X project which just contains the actual resource file and a few functions to pull the strings out of the resource file - it seems to work well, the biggest issue really is getting the text translated and then chekcinng that the length of the translated text fits into your screen design.

Hope this helps
 
Thanks for comments ClintonWhite.

Although it may well be the route we ultimately choose, I am a bit apprehensive about the resource file approach simply because the strings have to be referenced by their numeric id's. We would probably use an Enum type in order to map meaningful names for strings to their id's but that then means info has to be maintained in two places.

Also, we would probably want to automate the population of captions etc in forms by, for example, using the tag property of each relevant control to contain a refernce to the resource file (and load with appropriate values during FormLoad routine) but then we could not use the Enum approach.
 
Thanks - the article could well prove useful.
 
There's an excellent book for this problem:

Internationalzation with Visual Basic
Michael S Kaplan
SAMS Publishing
ISBN: 067-321977-2

cfr: or
_________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top