BIS fnc localize: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(BIS_fnc_localize's input parameters changed within the past versions of ArmA 3 (29.12.2017))
No edit summary
Line 43: Line 43:
[[Category:Functions|{{uc:localize}}]]
[[Category:Functions|{{uc:localize}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:localize}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:localize}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on December 29, 2017 - 00:03 (UTC)</dd>
<dt class="note">[[User:Vincent H.|Vincent H.]]</dt>
<dd class="note">
Unfortunately [[localize]] does not exactly the same as [[BIS_fnc_localize]].<br>
[[BIS_fnc_localize]] also checks if it the input string [[isLocalized]] while [[localize]] will return an empty string if the input parameter is not localized.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 01:03, 29 December 2017


Hover & click on the images for description

Description

Description:
Checks if passed string is localization key and if so, return the localized text. Else, returns the passed string itself.
Arma 3
This function does exactly the same as the command localize
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
localizationString call BIS_fnc_localize
Parameters:
localizationString: String
Return Value:
String - the localized text behind the key or the key itself (if not localized).

Examples

Example 1:
//assuming the stringtable contains a key "STR_someString" with the value "Hello world" "STR_someString" call BIS_fnc_localize; //returns "Hello world" //assuming the stringtable does not contain a key "STR_anotherString" "STR_anotherString" call BIS_fnc_localize; //returns "STR_anotherString"

Additional Information

See also:
See also needed

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

Notes

Bottom Section

Posted on December 29, 2017 - 00:03 (UTC)
Vincent H.
Unfortunately localize does not exactly the same as BIS_fnc_localize.
BIS_fnc_localize also checks if it the input string isLocalized while localize will return an empty string if the input parameter is not localized.