isLocalized: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{GameCategory|arma3|New Scripting Commands}} {{GameCategory|arma3|Scripting Commands}} {{uc:{{PAGENAME}}}}" to "")
(formatting and new command group)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma3
|game1= arma3


|0.50
|version1= 0.50


|gr1= Strings
|gr1= Strings


| Checks whether given string name is [[localize]]d.
|gr2= Localization
 
|descr= Checks whether given string name is [[localize]]d.
{{Feature | Informative | Since Arma 3 v2.03.147217, [[isLocalized]] accepts prefix <tt>"$"</tt> in the key name}}
{{Feature | Informative | Since Arma 3 v2.03.147217, [[isLocalized]] accepts prefix <tt>"$"</tt> in the key name}}
{{Wiki | TODO | Remove above with 2.04 release, update examples }}
{{Wiki | TODO | Remove above with 2.04 release, update examples }}
Line 14: Line 16:
|p1= stringName: [[String]]
|p1= stringName: [[String]]


| [[Boolean]]
|r1= [[Boolean]]


|x1= <code>[[if]] ([[isLocalized]] "STR_DN_SNAKE") [[then]] {
|x1= <code>[[if]] ([[isLocalized]] "STR_DN_SNAKE") [[then]]  
{
[[hint]] [[localize]] "STR_DN_SNAKE";
[[hint]] [[localize]] "STR_DN_SNAKE";
} [[else]] {
}  
[[else]]  
{
[[hint]] "STR_DN_SNAKE";
[[hint]] "STR_DN_SNAKE";
[[diag_log]] "ToDo: STR_DN_SNAKE is not localized";
[[diag_log]] "ToDo: STR_DN_SNAKE is not localized";
};</code>
};</code>


| [[localize]],[[diag_localized]], [[getTextRaw]], [[WFSideText]], [[Stringtable.csv]], [[Stringtable.xml]], [[BIS_fnc_localize]]
|seealso= [[localize]],[[diag_localized]], [[getTextRaw]], [[WFSideText]], [[Stringtable.csv]], [[Stringtable.xml]], [[BIS_fnc_localize]]
}}
}}

Revision as of 12:09, 14 March 2021

Hover & click on the images for description

Description

Description:
Checks whether given string name is localized.
Since Arma 3 v2.03.147217, isLocalized accepts prefix "$" in the key name
🚧
TODO: Remove above with 2.04 release, update examples
Groups:
StringsLocalization

Syntax

Syntax:
Syntax needed
Parameters:
stringName: String
Return Value:
Boolean

Examples

Example 1:
if (isLocalized "STR_DN_SNAKE") then { hint localize "STR_DN_SNAKE"; } else { hint "STR_DN_SNAKE"; diag_log "ToDo: STR_DN_SNAKE is not localized"; };

Additional Information

See also:
localizediag_localizedgetTextRawWFSideTextStringtable.csvStringtable.xmlBIS_fnc_localize

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