{"name":"BIS_fnc_localize","operator":null,"title":"BIS fnc localize","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_localize","revid":308934,"updated":"2022-04-18T19:33:30Z","groups":["Strings"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.00"}],"since":{"game":"arma3","name":"Arma 3","version":"1.00"},"arma3_since":"1.00","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Checks if passed string is localization key and if so, return the localized text. Else, returns the passed string itself.","syntaxes":[{"syntax":"localizationString call BIS_fnc_localize","since":null,"effect":null,"exec":null,"params":[{"name":"localizationString","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"localizationString: String"}],"returns":{"type":"String","types":["String"],"description":"the localized text behind the key or the key itself (if not localized).","text":"String - the localized text behind the key or the key itself (if not localized)."}}],"examples":[{"text":"```sqf\n// assuming the stringtable contains a key \"STR_someString\" with the value \"Hello world\"\n\"STR_someString\" call BIS_fnc_localize; // returns \"Hello world\"\n\n// assuming the stringtable does not contain a key \"STR_anotherString\"\n\"STR_anotherString\" call BIS_fnc_localize; // returns \"STR_anotherString\"\n```","code":["// assuming the stringtable contains a key \"STR_someString\" with the value \"Hello world\"\n\"STR_someString\" call BIS_fnc_localize; // returns \"Hello world\"\n\n// assuming the stringtable does not contain a key \"STR_anotherString\"\n\"STR_anotherString\" call BIS_fnc_localize; // returns \"STR_anotherString\""]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["isLocalized","localize","Stringtable.xml"],"notes":[{"user":"Vincent H.","date":"2017-12-29T00:03:00Z","text":"Unfortunately localize does not exactly do the same as BIS_fnc_localize.\n\nBIS_fnc_localize also checks if it the input string isLocalized while localize will return an empty string if the input parameter is not localized."}],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Strings","Functions","Introduced with Arma 3 version 1.00"],"docblock":null,"filled_from_docblock":[]}