Lables in different languages

mazza

Registered User.
Local time
Today, 12:55
Joined
Feb 9, 2005
Messages
101
I have a multilingual database. currently I set a public code when a user logs on setting the language to be used on form Labels and report Labels.
I use the on load event in forms and on Current event for reports to set the labels caption eg
if gbllanguage = "English" them me.label1.caption = "English language"
if gbllanguage = "Deutsch" them me.label1.caption = "Deutsche Sprache"
etc

Now the database is rather big and more and more languages are to be added. It is quiete cumbersombe to update the VBA modules.

Does anyone have an idea how to set the label values in a table and when a form is opened the relevant labels will appear in the corresponding language/value.

Obviously I don't want it to slow down opening the forms etc as the program is rather big
 
What we ended up doing was to use a single index on a table (no primary key). Each unique label had a main index into this table (duplicates allowed) and the selected language had a field (not indexed), so as an example the NAME label might be lable 19, and English 1, Deutsch 2, etc. So from a label point of view you only needed to know the 19, the language was selected from a combo or stored parameter.
Then we used a function that each caption called with it's number =GetLabelValue(19) and the function would check the language setting (a global var in our case) and return the proper string. Now I can't say it is blazingly fast, but using ADO in the function helped. So now if we add a field, or form we just have to account for the lable number in the table (or reuse one in a lot of cases).
We also created a unbound maint. form that makes the language maint. easy by denormalizaing the language table and displying it in tabular format, so when they see it, column contains english, col 2 contains Deutsch etc. This is the biggest headache when a new language is added, getting this form a new column, but it works pretty good over all.
Others may have a better way.
 
Thanks, sorry for late reply but have been away from the work place for a while. It looks interesting. Would you have a sample of coding the function
Not that familiar yet with ADO coding.

Thanks
 

Users who are viewing this thread

Back
Top Bottom