Extracting strings from a TsiLangLinked
Posted: Wed Dec 04, 2002 10:30 pm
Hi,
I'd like to build action bars (menu and tools) at run time. To do this I must know the names of the actions. As long as I use one language, this is easy to achieve, using more than one language, extracting the from TsiLangLinked strings in the language selected would be more convenient.
So I tried 'itemName := lngUStart.OtherStrings.Values[actDBFirst.Category]' but nothing was returned. The name 'actDBFirst.Category' can be found in 'Other strings' using Translation editor - Other.
With 'lngUStart.OtherStrings.GetText' (or .CommaText or .DelimitedText) I get all entries in 'Other strings' but I only want exactly one which has to be in the language choosen.
'itemName := lngUStart.OtherStrings.ValueFromIndex[index]', which returns all translations of an entry including its name with the first letter cut off, would be no good choice because the index may vary while the name of an entry doesn't.
The same applies to 'Captions'.
How can I get the correct language entry as a string from 'Captions' and 'Other'?
Thanks for your help!
Christian Lauer
I'd like to build action bars (menu and tools) at run time. To do this I must know the names of the actions. As long as I use one language, this is easy to achieve, using more than one language, extracting the from TsiLangLinked strings in the language selected would be more convenient.
So I tried 'itemName := lngUStart.OtherStrings.Values[actDBFirst.Category]' but nothing was returned. The name 'actDBFirst.Category' can be found in 'Other strings' using Translation editor - Other.
With 'lngUStart.OtherStrings.GetText' (or .CommaText or .DelimitedText) I get all entries in 'Other strings' but I only want exactly one which has to be in the language choosen.
'itemName := lngUStart.OtherStrings.ValueFromIndex[index]', which returns all translations of an entry including its name with the first letter cut off, would be no good choice because the index may vary while the name of an entry doesn't.
The same applies to 'Captions'.
How can I get the correct language entry as a string from 'Captions' and 'Other'?
Thanks for your help!
Christian Lauer