> For the complete documentation index, see [llms.txt](https://docs.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.angular-package.dev/sass/translator-v1.0.0/translator.dictionary.md).

# translator.dictionary()

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

{% code lineNumbers="true" %}

```scss
// 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
  );
}
```

{% endcode %}

{% embed url="<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

```scss
// Use.
@use '@angular-package/sass/translator';

// Variables.
$-dictionary-example: (
  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.
// Gets the global dictionary.
@debug dictionary(); // (word: translation)

// Merge the global dictionary.
$-test: dictionary.merge(null, $-dictionary-example);

// Set the global dictionary.
$-test: dictionary.set(global, this is global translation);

// Gets the general dictionary.
@debug dictionary(general); // (word: słowo, prefix: spectre, border: b, color: c, separator: "-", suffix: end, outline: o, global: this is global translation, (wrapper, wrap): owijka, (technology, technologia): tech)

// Gets nested (class, calendars) dictionary.
@debug dictionary((class, calendars)); // (word: translation, prefix: spectre, border: b, color: c, separator: "-", suffix: end, outline: o, global: this is global translation, calendar: cal)

// Gets the general and nested (class, calendars) dictionary.
@debug dictionary(general, (class, calendars)); // (word: słowo, prefix: spectre, border: b, color: c, separator: "-", suffix: end, outline: o, global: this is global translation, (wrapper, wrap): owijka, (technology, technologia): tech, calendar: cal)

// Get multiple nested.
@debug dictionary((class, calendars), (class, labels), class); // (word: translation, prefix: class-prefix, border: b, color: c, separator: class-separator, suffix: class-suffix, outline: o, global: this is global translation, calendar: cal, label: lab)

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.angular-package.dev/sass/translator-v1.0.0/translator.dictionary.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
