// Variables.
@forward 'dictionary.variables';
@use 'dictionary.variables' as variables;
// Modules.
@use '../../map';
// The `translator.dictionary-set()` or `dictionary.set()` function.
@function set($key, $value) {
variables.$dictionary: map.set(variables.$dictionary, $key, $value);
@return variables.$dictionary;
}
// Use.
@use '@angular-package/sass/translator';
// Examples.
$-dictionary: (
general: (word: słowo, (wrapper, wrap): owijka, (technology, technologia): tech, color: c),
class: (prefix: class-prefix, separator: class-separator, suffix: class-suffix, calendars: (calendar: cal), labels: (label: lab)),
prefix: spectre,
border: b,
color: c,
separator: '-',
suffix: end,
outline: o,
var: (prefix: var-prefix, suffix: var-suffix),
);
// Examples.
// Sets translation of `small` as `sm`
@debug translator.dictionary-set(small, sm); // (word: translation, small: sm)
// Sets the `class` dictionary
@debug translator.dictionary-set(class, map.get($-dictionary, class)); // (word: translation, small: sm, class: (prefix: class-prefix, separator: class-separator, suffix: class-suffix, calendars: (calendar: cal), labels: (label: lab)))