Re: Foreign language issues

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ralph (msnews.20.nt_consulting32_at_spamgourmet.com)
Date: 09/28/04


Date: Tue, 28 Sep 2004 14:39:20 -0500


"Henk Borsje" <hjborsje@verizon.net> wrote in message
news:pdi6d.1792$Xd2.1347@trndny01...
> Dear reader,
>
> My VB6 application requires that all strings in the user interface be
> translated into a foreign language. I have set up a large table with
> translated strings that I read at program initialization. Creating the
> translations was the largest part of the effort. I am still hoping that
> there is a way to programmatically get hold of some of the most commonly
> used interface words that are part of the OS software. 'File',
> 'Cancel','Tools', etc. are some examples.
>
> When a PC has a non-English default language, is there a way for a VB
> application to obtain the translated text for these standard terms in the
> language specific for this PC?
>
> Thanks for your help.
>
> Henk Borsje
>

Yes you can use "StringTables" in resource files to do what you are
attempting.

http://support.microsoft.com/default.aspx?scid=kb;en-us;232625

You might also want to check out M$ Internationalization or Globalizing
sites. Most of the current articles are based on .NET but still contain some
good information. With a little extra searching you can uncover the older VB
Classic articles in the archives.

However, if I might make a suggestion. You might not want to confine your
localization to just strings, especially when working with Dialogs and
Forms. I once tried that several years ago when one of my clients was first
venturing forth on the International scene. We attempted to create
'universal' dialogs/forms and just swap out 'strings' as needed. It was a
disaster.

First problem was the relative length of 'commands' in different languages -
English is almost always shorter. Comparable phrases in one language was
never the same size in others. So dialogs/forms came out with tons of wasted
space around some controls and appeared cramped in others. This lead to a
painful exercise in redrawing everything. Also, seemingly harmless
'translations' of simple commands like you noted before - came out silly,
rude, and even insulting in other languages if one was not careful. (Icons
with the wrong hand gesture and even the wrong color of hat suffered the
same results - but that is another story).

Using VB we found it was simpler to actually teach translators how to
'design' forms using Visual Studio and then swapped out entire forms based
on locale. This worked by a serious effort to separate presentation from
code by using a "class-behind" every dialog/form.

hth
-ralph



Relevant Pages

  • Re: setup in japanese?
    ... is there a way to specify translations of custom Install UI strings ... the UI language in the project properties. ...
    (microsoft.public.dotnet.framework.setup)
  • Re: Multilanguage
    ... I thought to put the translations into a database. ... Collect a list from all strings in a project ... return the selected language string "langstring ...
    (microsoft.public.vb.general.discussion)
  • Re: NRC kwaliteitskrant? Echt niet!
    ... language has borrowed other words or usages from. ... poor translations from English tend to have on other languages. ... Why would native German speakers ...
    (sci.lang)
  • Re: add support for other languages
    ... language DLLs or a single DLL with multiple language support, ... Just compile in Unicode ... You can create a hand-edited resource that contains Unicode strings, but you have to do it ... I don't know where is the language support comes into ...
    (microsoft.public.vc.mfc)
  • Re: Two Questions about "strlen", "strcat" and "strcpy"
    ... >>Important is that we have in the standard language a way of using ... > No. zero terminated strings is the whole problem in the first place. ... > programmer to think in terms of implementation and constantly respin ... The standards comitee refuses any change, ...
    (comp.lang.c)