GMan Well-Known Member Licensed User Longtime User May 20, 2014 #1 Hoi, i have several language depending text parts in different String-Variables like ManualtextEN, ManualtextDE etc. Now i have a second Variable SPEECH depending on the choosen language like EN, DE etc. Now i want append the language variable SPEECH to the Manualtext-variablename to call the correct translations for the Labels etc. The user choosed i.e. EN - so i want to load the text in ManualtextEN in a labeltext. How can i generate the correct variable on runtime ? This don't work of course: Code: Copy Manualtext = (Manualtext & SPEECH) lblManual.Text = Manualtext because the CONTENT of the variable is returned and not the (new) variable ManualtextEN
Hoi, i have several language depending text parts in different String-Variables like ManualtextEN, ManualtextDE etc. Now i have a second Variable SPEECH depending on the choosen language like EN, DE etc. Now i want append the language variable SPEECH to the Manualtext-variablename to call the correct translations for the Labels etc. The user choosed i.e. EN - so i want to load the text in ManualtextEN in a labeltext. How can i generate the correct variable on runtime ? This don't work of course: Code: Copy Manualtext = (Manualtext & SPEECH) lblManual.Text = Manualtext because the CONTENT of the variable is returned and not the (new) variable ManualtextEN
thedesolatesoul Expert Licensed User Longtime User May 20, 2014 #2 Why not use a Map? Where Map contains (SPEECH, ManualText) for e.g. ("EN", ManualTextEN), ("DE", ManualTextDE) so you just need to do lblManual.Text = MapLang.Get(SPEECH) Upvote 0
Why not use a Map? Where Map contains (SPEECH, ManualText) for e.g. ("EN", ManualTextEN), ("DE", ManualTextDE) so you just need to do lblManual.Text = MapLang.Get(SPEECH)
GMan Well-Known Member Licensed User Longtime User May 21, 2014 #3 Jo, now uses a map. If i KNEW a solution it was quicker, but so it was quicker to make this many requests and puts and gets Upvote 0
Jo, now uses a map. If i KNEW a solution it was quicker, but so it was quicker to make this many requests and puts and gets