# dictionary.is-global()

The `dictionary.is-global()` function checks whether the global dictionary is in use. Function checks the [`$dictionary-global`](https://docs.angular-package.dev/sass/translator-v0.1.0/dictionary.variables#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

```
