getTextRaw: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|game([0-9]) ?= (.+) \|version([0-9]) ?= (.+) " to "|game$1= $2 |version$3= $4 ")
m (Some wiki formatting)
Line 16: Line 16:
|r1= [[String]] - raw text value
|r1= [[String]] - raw text value


|x1= <code>_text = [[getTextRaw]] ([[configFile]] [[gtgt|>>]] "CfgVehicles" [[gtgt|>>]] "Thing" [[gtgt|>>]] "displayName"); {{cc|"$STR_ACTION_GETIN_DRIVER"}}
|x1= <sqf>
_key = _text [[select]] [1]; {{cc|"STR_ACTION_GETIN_DRIVER"}}
private _text = getTextRaw (configFile >> "CfgVehicles" >> "Thing" >> "displayName"); // "$STR_ACTION_GETIN_DRIVER"
_localized = [[localize]] _key; {{cc|"Get in %1 as Driver"}}
_key = _text select [1]; // "STR_ACTION_GETIN_DRIVER"
_localized == [[getText]] ([[configFile]] [[gtgt|>>]] "CfgVehicles" [[gtgt|>>]] "Thing" [[gtgt|>>]] "displayName"); {{cc|true}}</code>
_localized = localize _key; // "Get in %1 as Driver"
_localized == getText (configFile >> "CfgVehicles" >> "Thing" >> "displayName"); // true
</sqf>


|seealso= [[Stringtable.xml]] [[localize]] [[isLocalized]] [[diag_localized]] [[BIS_fnc_localize]] [[getText]] [[getNumber]] [[getArray]]
|seealso= [[Stringtable.xml]] [[localize]] [[isLocalized]] [[diag_localized]] [[BIS_fnc_localize]] [[getText]] [[getNumber]] [[getArray]]
}}
}}

Revision as of 21:39, 18 April 2022

Hover & click on the images for description

Description

Description:
Returns raw text from config entry. If entry is subject to localization, the translation key is returned. To obtain the localized text, see getText.
Groups:
ConfigLocalization

Syntax

Syntax:
getTextRaw config
Parameters:
config: Config
Return Value:
String - raw text value

Examples

Example 1:
private _text = getTextRaw (configFile >> "CfgVehicles" >> "Thing" >> "displayName"); // "$STR_ACTION_GETIN_DRIVER" _key = _text select [1]; // "STR_ACTION_GETIN_DRIVER" _localized = localize _key; // "Get in %1 as Driver" _localized == getText (configFile >> "CfgVehicles" >> "Thing" >> "displayName"); // true

Additional Information

See also:
Stringtable.xml localize isLocalized diag_localized BIS_fnc_localize getText getNumber getArray

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note