Andreas_karl
10th December 2010, 09:08
Is it possible to execute the text manager and show the text for a defined language at startup?
at the moment I'm using: execute(text.manager)

bdittmar
10th December 2010, 10:11
Is it possible to execute the text manager and show the text for a defined language at startup?
at the moment I'm using: execute(text.manager)

Hello,

try:

text.set.language()
Syntax:

function boolean text.set.language (string text_field, string language, void ...)

Description


This function changes the language for multiline textfields that are displayed on the form and are part of the maintable. That language will be used when (one of) the textfields are/is read from the text tables. The language that is set with this function can still be overridden by setting attr.textlang$ in the before.choice section for the text.manager.

If this function is called after one of the texts is changed in a multiline text formfield, then the record is saved first (with the text in the current language). After the language is set the text is read from the database in the new language, but not displayed on the form yet. You can use function display(<text_field>) to display the text in the multiline text formfield.

Field names and language codes must be provided in pairs.


Arguments

string text_field The name of the textfield for which the language must be set.

string language The language code.

void ...

Return values

false some error occured

true function successful

Context

This function can be used in 4GL script types.

Note
You cannot use the function in any subsection of choice.update.db and in the field sections of the multiline text fields.

Example

ret = text.set.language("ttadv151.docu", "3",
"ttadv151.help", "1")

Regards

Andreas_karl
13th December 2010, 10:19
Thanks that helped :)