BIS fnc localize: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{Function " to "{{RV|type=function ") |
Lou Montana (talk | contribs) m (Text replacement - "\{\{ *codecomment *\| *\/\/ *([^ ]+) *\}\} " to "{{cc|$1}}") |
||
Line 15: | Line 15: | ||
| [[String]] - the localized text behind the key or the key itself (if not localized). | | [[String]] - the localized text behind the key or the key itself (if not localized). | ||
|x1= <code>{{ | |x1= <code>{{cc| assuming the [[Stringtable.xml|stringtable]] contains a key "STR_someString" with the value "Hello world"}}"STR_someString" [[call]] [[BIS_fnc_localize]]; {{cc| returns "Hello world"}} | ||
"STR_someString" [[call]] [[BIS_fnc_localize]]; {{ | {{cc| assuming the [[Stringtable.xml|stringtable]] does not contain a key "STR_anotherString"}}"STR_anotherString" [[call]] [[BIS_fnc_localize]]; {{codecomment|// returns "STR_anotherString"}}</code> | ||
{{ | |||
"STR_anotherString" [[call]] [[BIS_fnc_localize]]; {{codecomment|// returns "STR_anotherString"}}</code> | |||
| [[isLocalized]], [[localize]], [[Stringtable.xml]] | | [[isLocalized]], [[localize]], [[Stringtable.xml]] |
Revision as of 16:33, 29 January 2021
Description
- Description:
- Description needed
- Execution:
- call
- Groups:
- Strings
Syntax
- Syntax:
- Syntax needed
- Parameters:
- localizationString: String
- Return Value:
- Return value needed
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
- Posted on December 29, 2017 - 00:03 (UTC)
- Vincent H.
-
Unfortunately localize does not exactly do 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.