translator.translate()
// Sass.
@use 'sass:list';
@use 'sass:map';
@use 'sass:meta';
// Functions.
@use 'translator.dictionary.function';
// Modules.
@use 'dictionary';
@use 'translate';
// The `translator.translate()` function.
@function translate($words, $key: null, $dictionary: (), $global: null) {
@return meta.call(
map.get(
(
list: meta.get-function(list, false, translate),
map: meta.get-function(map, false, translate),
string: meta.get-function(string, false, translate),
),
meta.type-of($words)
),
$words,
null,
translator.dictionary($key, $dictionary, $global)
);
}https://github.com/angular-package/sass/blob/main/translator/_translator.translate.function.scss
Parameters
$words
$words$key: null
$key: null$dictionary: ()
$dictionary: ()$global: null
$global: nullReturn
Examples
Last updated