learner
7th April 2006, 19:36
Hi,

I wrote one small piece of code and was wondering why attr.textlang$ is returning blank , is it some tools issue or i am doing some mistake ...



form.1:
init.form:

string lang(1)

lang = attr.textlang$
message("%s",lang) |returns Blank
end()


message("%s",lang) returns Blank ideally it should have returned user language maintained in User data.

correct me if i am wrong.

Regards

Learner

NPRao
7th April 2006, 20:58
ideally it should have returned user language maintained in User data.
Ideally, you have to use this predefined variable -
string language$(1) R Current language code.

From the programmer's manual -
string attr.textlang$(1) 4 Language for text editing. Used by the Text Manager.
boolean text.set.language( string text_field(17), string language(1)
[, string text_field(17), string language(1) ...] )

Description
This sets the language for textfields that 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.