# dictionary.is-global()

The `dictionary.is-global()` function checks whether the global dictionary is in use. Function checks the [`$dictionary-global`](/sass/translator-v0.1.0/dictionary/dictionary.variables.md#usddictionary-global-true) variable.

{% code lineNumbers="true" %}

```scss
// Sass.
@use 'sass:meta';

// Variables.
@use 'dictionary.variables' as variables;

// The `translator.dictionary-is-global()` or `dictionary.is-global()` function.
@function is-global($global: null) {
  @if if(meta.type-of($global) == bool, $global, variables.$dictionary-global) {
    @return true;
  }
  @return $global;
}
```

{% endcode %}

{% embed url="<https://github.com/angular-package/sass/blob/main/translator/dictionary/_dictionary.is-global.function.scss>" %}

### Parameters

#### `$global: null`

An optional `bool` value indicates whether to use or not the global dictionary. Default, `null`.

### Return

The return value is a `bool` indicating whether to use a global dictionary.

## Examples

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

// Examples.
// `variables.$dictionary-global`
@debug translator.dictionary-is-global(); // true

// `$global`
@debug translator.dictionary-is-global(true); // true
@debug translator.dictionary-is-global(false); // false

```


---

# Agent Instructions: 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-v0.1.0/dictionary/dictionary.is-global.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.
