How to set up a Multi-lingual app.

M

Mario

Hi there ,
Is anyone familiar with multilingaul application in Ms Access.
I'd like to change the captions on buttons, labels , etc , to the required
language when chosen.
for instance :
When a user choses to set the language to French or German or any language ,
the captions should change.
Does anyone know how to do this.
Many thanks
Mario
 
M

missinglinq via AccessMonster.com

There's no Access defined way, if that's what you're asking, and no practical
way that I've ever heard of or can think of, unless this is a VERY limited
application, form and control wise! You'd have to have an opening form that
would determine the language to be used, then assign that value to a global
variable, call it strLanguage. Then in the loading event for EACH FORM, you'd
have to assign the caption for EACH CONTROL accordingly!

Private Sub Form_Load()
If strLanguage = "German" Then
Control1.Caption ="German caption for 1st control"
Control2.Caption ="German caption for 2nd control"
Control3.Caption ="German caption for 3rd control"
End If
If strLanguage = "French" Then
Control1.Caption ="French caption for 1st control"
Control2.Caption ="French caption for 2nd control"
Control3.Caption ="French caption for 3rd control"
End If
If strLanguage = "Spanish" Then
Control1.Caption ="Spanish caption for 1st control"
Control2.Caption ="Spanish caption for 2nd control"
Control3.Caption ="Spanish caption for 3rd control"
End If
If strLanguage = "English" Then
'Do nothing here. The originally assigned captions will remain in place
End If
End Sub

As you can imagine this would be very cumbersome!

Good luck!
 
R

Rick Brandt

Mario said:
Hi there ,
Is anyone familiar with multilingaul application in Ms Access.
I'd like to change the captions on buttons, labels , etc , to the
required language when chosen.
for instance :
When a user choses to set the language to French or German or any
language , the captions should change.
Does anyone know how to do this.
Many thanks
Mario

I have one app that supports three languages. Most text on reports and forms is
done with TextBoxes and they use the same function to display the appropriate
text. EX: =GetText(100), =GetText(123)

There is a main table that houses all of the text used in the app. Each entry
has a number (100, 123, etc.), and a language "English", "German", "French". At
startup the user selects the language and the function retrieves the correct
text to show in each location.

In some cases I do use labels and each form/report loops through all of these in
the Open event and uses the same table to set the caption. The difference with
the label is that some of the entries in the table have an additional field
populated that indicates to switch the font to Arial Narrow. In the loop I can
make that change at the same time. Sometimes the same phrase in a different
language is too long without switching to the narrow font. For labels I place
the number of the text phrase to use in the Tag property.

It's crude and the app in question only has a total of 300 or so phrases, but
for what it needs to do it works well.
 
M

Mario

Hello all ,

Thanks for the replies. Much appreciated.
It will help me in my further investigation for this matter.
Some ideas are good.
Thanks again
Mario
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top