translator.translate()
The translator.translate()
function translates string
, map
, or list
with a global dictionary and/or $dictionary
, optionally with a dictionary retrieved by $key
.
Global dictionary is in use on $dictionary-global
set to true
, or by setting $global
argument to true
.
Parameters
$words
$words
The words in string
, list
, or map
to translate.
$key: null
$key: null
A key of the dictionary that is used to translate $words
.
$dictionary: ()
$dictionary: ()
The dictionary of map or list type(dictionary key) used to translate $words
.
$global: null
$global: null
A bool
value indicates whether to use a global dictionary. Default, null
, then $dictionary-global
is checked.
Return
The return value is a flattened map dictionary consisting of (word:translation).
Examples
Last updated