Syntax
| TT(myText[, Param1][, Param2][, ...Paramn])
| ||||||
---|---|---|---|---|---|---|---|
Description
| Converts a string into a translated string. Translation is done into the same language as previously set by the "LANG" Session variable. This allows to create dynamic text in multiple languages.
How it works:
When parsing a string thru TT, the CCL-engine checks the value of the LANG session variable. Using that value, the string is dynamically translated with DeepL™-technology. Also, the string is stored inside the Windows Registry, together with it's translation, creating a cache to speed up processing. The text may contain one or more variables, identified with %s. After the translation, these variables are replaced with the parameters provided, in the same sequence.
| ||||||
See Also
| |||||||
Example
| Sub Main
SetSessionVar "LANG", "DE" 'Translate to German
Repl$ = InputBox$(“Enter text, with one %s variable in it:”)
Repl$ = TTW(Repl$, "hello, world!")
Msgbox “Translated: “ & Repl$ End Sub
| ||||||