"setText" (langString::setText)
The function sets a text of a langString to the given string.
Synopsis
int langString.text(string text);
int langString.text(int index, string text);
int langString.text(string lang, string text);
int langString.text(OaLanguage lang, string text);
Parameters
| Parameter | Description |
|---|---|
| index | index of the language entry |
| lang | string or OaLanguage enum that defines a language |
| text | the text to be entered |
Return Value
Errors
invalid arguments
Description
The function sets a text of a langString to the given string. The parameters “index” and “lang” specify the language for the given text (parameter “text”).
Depending on the aditional parameter the entry is made:
| Parameter | Entry |
|---|---|
| - | Sets the text for the currently active language. |
| int index | Sets the text for the language with the given index. |
| string lang | Sets the text for the language defined by the string. |
| OaLanguage lang | Sets the text for the language defined by the enum. |
Example
A langString is made and the entry for english is changed.
main()
{
dyn_string word;
word[1] = "Information";
word[2] = "information";
langString langWord = word;
langWord.setText(OaLanguage::en_US, "new Information");
DebugN(langWord.text(OaLanguage::en_US) );
}
Assignment
Miscellaneous Functions
Availability
CTRL
