Hi Benjamin,
This sounds like a feasible approach. However, I wonder if you wouldn't be better off creating
three tables to accommodate a many-to-many relationship, which is two one-to-many relationships:
1.) A Control can have captions in many languages (1:M) and
2.) Many language can be displayed as captions (1:M)
The ControlNames listed in tblControls would be fixed in the language of your choice, since the
end user should never see these values.
tblLanguages
LangID Language
1 English
2 Deutsch
3 Nederlands
tblControls
ControlID ControlName
1 lblProduct
2 lblCustomer
3 lblSupplier
tblLabelCaptions
ControlID LangID Caption
1 1 Customer
2 1 Product
3 1 Supplier
1 2 Kunde
2 2 Produkt
3 2 Lieferant
1 3 De klant
2 3 Het product
3 3 De leverancier
This design will allow you to add new languages at a later date, without requiring any design
changes. The design you proposed requires that a field be added to the tLANG table in order to
add a new language. This would likely require additional changes to queries and VBA code to
accommodate the new field names.
Looks like you might want to make a similar table of trappable error messages, where you could
provide a more useful error message than what a lot of the error messages currently display. You
can generate a table of error messages using the procedure shown here:
http://support.microsoft.com/?id=268721
Something like this. Note: I used a fairly straight-forward error message, which probably
wouldn't need to be translated. However there are plenty of error messages where a developer
typically wants to trap and display a more "user-friendly" error message. The data shown below,
for German and Dutch, is my best guess, using a free internet-based translation service:
tblErrorMessages
LangID ErrorNum ErrorText
1 11 Division by zero
2 11 Teilung durch null
3 11 De divisie door nul
:
:
:
:
Good Luck!
Tom
_________________________________________
maybe i have found a really simple solution:
create a tabel with a field for each language
Table: tLANG (for language)
Field 1: LANGDFLT (for default language)
Field 2: LANGENGLISH (for english language)
Field 3: LANGDUTCH (for dutch language)
in the fields you have to write the names of the labels in forms/reports/...
for example:
LANGDFLT: Customer
LANGGERMAN: Kunde
now when a form or reports opens you have to run through all the labels in
the form and search for this label in the table tLANG ... and replace it
with the value the selected language field contains
should be that easy
any comments ?
regards
Benjamin