translator.dictionary()

The translator.dictionary() function returns global dictionary(flattened map), optionally merged with dictionaries retrieved from $keys.

// Sass.
@use 'sass:list';

// Modules.
@use '../../map';
@use 'dictionary';

// The `translator.dictionary()` function.
@function dictionary($keys...) {
  @return map.remove-type(
    if(
      list.length($keys) > 0,
      map.deep-merge-key(dictionary.get(), $keys...),
      dictionary.get()
    ),
    map
  );
}
https://github.com/angular-package/sass/blob/main/translator/_translator.dictionary.function.scss

Parameters

$keys...

Keys to merge the dictionaries under these keys with a dictionary.

Return

The return value is a flattened map dictionary consisting of (word:translation).

Examples

Last updated

Was this helpful?