multilingual system

  • Thread starter Thread starter John Marshall, MVP
  • Start date Start date
J

John Marshall, MVP

Any suggestions for creating a multlingual system?

Rather than creating seperate forms for each language, I am leaning towards
single forms with fixed text fields filled from a table that has columns of
text segments, a different column for each language. Messages would be
handled in a similar manner.

John... Visio MVP

Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm
Need VBA examples? http://www.mvps.org/visio/VBA.htm
Common Visio Questions http://www.mvps.org/visio/common_questions.htm
 
Hi,


Use place holder %1, %2, ... rather than segments, since some
languages may end up having a different number of segments. As example, if
[blue] is to be inserted, "Number of" & blue & " jackets" make two
segments, one at each side of the inserted text, but in French, you have
only one segment, "Nombre de jacket " & blue. The reverse is also quite
often observable. If you use place holders, you can then use Replace( ) to
replace them with the right word, in the right sequence ( %2 %1 rather
than %1 %2, let say, for illustration).


Sure, the idea is to have a table with, as fields, the table name,
the caption name, and the language:


FormName, ControlName, 1, 2 ' 1= English, 2=French, as
example
"Login", "Name", "Enter your first name", "Entrez votre prénom"
"Login", "FamilyName", "Enter your last name", "Entrez votre nom de famille"
....


When you open a form, in the onOpen event, open a recordset

Dim rst As DAO.Recorset

Set rst = CurrentDb.OpenRecordset( "SELECT * FROM translations WHERE
FormName= " & Me.Name)

and cycle through it, looping over each ControlName:



On Error Resume Next

Do Until rst.EOF
Me(rst.Fields("ControlName").Value).Caption = rst.Fields( Language )
rst.MoveNext
Loop

Debug.Assert 0=Err.Number ' else, John made a boob in (re)naming a
caption
' without modifying his table...


Set rst=Nothing


( I didn't use any Replace, to not obscure the logic; also, a read only,
forward only recordset would be quite enough).



If you ever have to use multipage system, have you to include Inou? I
recommand you read the Michael Kaplan book on "Internationalization with
Visual Basic", at SAMS.



Hoping it may help,
Vanderghast, Access MVP
 
Hi John

I use a solution similar to the one outlined by Mr. Walsh, except that I use
the Tag property of the control(s) along with a / to deliniate the
French/English wording. I also include a pick list on the toolbar so that the
user can switch between the language of choice at any time.

The tables that contain picklist items are laid out as follows:

Key FrenchDesc EnglishDesc

It's quite a simple process after all.


Best regards

Maurice St-Cyr

Micro Systems Consultants, Inc.
Ottawa, Ontario, CANADA
 
So with the tags, are you displaying a bilingual message?

Most of the labels on the forms are repeated, so it makes sense to use
variables loaded from a table.

John... Visio MVP
(Ottawa)
 
Yes I'm displaying the bilingual message(s) as triggered by the Tag property

No, I converted my original method of translating from using a table to using
the tags. This way I don't have to do a disk read everytime I want to
translate something.

The translate routine is triggered when the form loads so this way all the
translations are done simultaneously and do not have to wait for a disk read.


Maurice St-Cyr

Micro Systems Consultants, Inc.
 
The problem with bilingual messages is that there are two formats.
English-French and French-English. If you've been to the new airport, you
must have noticed how annoying it was to read the arrival/departure board
and have to wait while the board displayed the Welcome to Ottawa message in
English-French and then French-English (or was that F-E then E-F).

There is also the issue of the amount of screen real estate bilingualism
takes up.

John... Visio MVP

Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm
Need VBA examples? http://www.mvps.org/visio/VBA.htm
Common Visio Questions http://www.mvps.org/visio/common_questions.htm
 
You certainly do need to plan the wording for both E/F translations and arrange
that both versions do fit within a predetermined area such as labels ( which
are the worst to handle). As far as translations, these are done by the client
anyway..all you have to do is set the limits

As far as ambiguity, the user knows what language he/she is working in since
he/she has the option to set this at any time.

Maurice St-Cyr
 
Back
Top