getTextRaw: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Some wiki formatting)
m (Some wiki formatting)
 
Line 17: Line 17:


|x1= <sqf>
|x1= <sqf>
private _text = getTextRaw (configFile >> "CfgVehicles" >> "Thing" >> "displayName"); // "$STR_ACTION_GETIN_DRIVER"
private _text = getText (configFile >> "CfgVehicles" >> "Thing" >> "displayName"); // "Get in %1 as Driver"
_key = _text select [1]; // "STR_ACTION_GETIN_DRIVER"
private _rawText = getTextRaw (configFile >> "CfgVehicles" >> "Thing" >> "displayName"); // "$STR_ACTION_GETIN_DRIVER"
_localized = localize _key; // "Get in %1 as Driver"
private _localized = localize _text; // "Get in %1 as Driver"
_localized == getText (configFile >> "CfgVehicles" >> "Thing" >> "displayName"); // true
_localized == _text; // true
</sqf>
</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]]
}}
}}

Latest revision as of 15:18, 18 September 2023

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 = getText (configFile >> "CfgVehicles" >> "Thing" >> "displayName"); // "Get in %1 as Driver" private _rawText = getTextRaw (configFile >> "CfgVehicles" >> "Thing" >> "displayName"); // "$STR_ACTION_GETIN_DRIVER" private _localized = localize _text; // "Get in %1 as Driver" _localized == _text; // 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