Copy as Markdown[View as Markdown](/docs/sdk/functions/addUbiquitousLanguageToDomain.md)

***

# Function: addUbiquitousLanguageToDomain()

> **addUbiquitousLanguageToDomain**(`directory`): (`id`, `ubiquitousLanguageDictionary`, `version`?) => `Promise`<`void`>

Defined in: domains.ts:279

Adds a ubiquitous language dictionary to a domain.

Optionally specify a version to add a ubiquitous language dictionary to a specific version of the domain.

## Parameters[​](#parameters "Direct link to Parameters")

| Parameter   | Type     |
| ----------- | -------- |
| `directory` | `string` |

## Returns[​](#returns "Direct link to Returns")

`Function`

### Parameters[​](#parameters-1 "Direct link to Parameters")

| Parameter                      | Type                           |
| ------------------------------ | ------------------------------ |
| `id`                           | `string`                       |
| `ubiquitousLanguageDictionary` | `UbiquitousLanguageDictionary` |
| `version`?                     | `string`                       |

### Returns[​](#returns-1 "Direct link to Returns")

`Promise`<`void`>

## Example[​](#example "Direct link to Example")

```
import utils from '@eventcatalog/utils';

const { addUbiquitousLanguageToDomain } = utils('/path/to/eventcatalog');

// Adds a ubiquitous language dictionary to the latest Payment domain
await addUbiquitousLanguageToDomain('Payment', { dictionary: [{ id: 'Order', name: 'Order', summary: 'All things to do with the payment systems', description: 'This is a description', icon: 'KeyIcon' }] });

// Adds a ubiquitous language dictionary to a specific version of the domain
await addUbiquitousLanguageToDomain('Payment', { dictionary: [{ id: 'Order', name: 'Order', summary: 'All things to do with the payment systems', description: 'This is a description', icon: 'KeyIcon' }] }, '0.0.1');
```
