Hey,
This is more a quest for your opinions and some information then a hardcore technical question...
For an application, I need a translation-possibility. I've done this by setting up a DB containing a key and then the 'value' for each language
Table layout:
[ KEY ] [LANG 1] [LANG 2] [LANG 3] [LANG 4]
It all works, but every time something needs translation, it makes a hit on the DB. This is true for nearly all labels I use on my forms, but sometimes data needs translation as well.
You can imagine the amount of hits the DB gets when the app starts up or if someone selects another language-option.
To counter this massive DB-traffic, I thought of simply loading every description for the correct language in an associative array [KEY] -> [LANG]. This would reduce the DB-hits a great deal because the translation table would only be accessed when the app starts up, or when another language is selected.
The problem I come across is that there does not seem to be a structure for associative arrays in VB6.
I did find the DICTIONARY object that would seem to do what I want, but I cannot get it to work.
Do you know of any ways to go about this problem? Did I miss something and are associative arrays available in VB6? Are you the expert in the VB6 dictionary-object that is willing to explain me how it works? Got better alternatives?
Please let me know. I'm willing to evaluate all proposed options here...
This is more a quest for your opinions and some information then a hardcore technical question...
For an application, I need a translation-possibility. I've done this by setting up a DB containing a key and then the 'value' for each language
Table layout:
[ KEY ] [LANG 1] [LANG 2] [LANG 3] [LANG 4]
It all works, but every time something needs translation, it makes a hit on the DB. This is true for nearly all labels I use on my forms, but sometimes data needs translation as well.
You can imagine the amount of hits the DB gets when the app starts up or if someone selects another language-option.
To counter this massive DB-traffic, I thought of simply loading every description for the correct language in an associative array [KEY] -> [LANG]. This would reduce the DB-hits a great deal because the translation table would only be accessed when the app starts up, or when another language is selected.
The problem I come across is that there does not seem to be a structure for associative arrays in VB6.
I did find the DICTIONARY object that would seem to do what I want, but I cannot get it to work.
Do you know of any ways to go about this problem? Did I miss something and are associative arrays available in VB6? Are you the expert in the VB6 dictionary-object that is willing to explain me how it works? Got better alternatives?
Please let me know. I'm willing to evaluate all proposed options here...