The translate.string() function returns a translated $string with a global dictionary(if in use) and/or $dictionary if translation is found, otherwise not translated $string.
Global dictionary is in use on $dictionary-global set to true, or by setting $global argument to true.
// Functions.@use'../translator.dictionary.function';// Modules.@use'../dictionary';// The `translator.translate-string()` or `translate.string()` function.@functionstring($string, $key: null, $dictionary: (), $global: null) {@returnif(type-of($string) == string, dictionary.translation( $string, translator.dictionary($key, $dictionary, $global) ) or $string, $string );}
Parameters
$string
A string to translate with a global dictionary and/or $dictionary.
$key: null
A key to retrieve the dictionary from a global(if in use) and/or $dictionary.