---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [i18n](../index.md) / registerTranslations

# Function: registerTranslations()

> **registerTranslations**(`namespace`, `lang`, `resources`): `void`

Defined in: [packages/b2c-tooling-sdk/src/i18n/index.ts:262](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/i18n/index.ts#L262)

Register translations for a namespace.

This is the primary way for packages to add their translations.
Each package should use its own namespace.

## Parameters

### namespace

`string`

The namespace (e.g., 'cli' for b2c-cli)

### lang

`string`

Language code (e.g., 'de')

### resources

`Record`\<`string`, `unknown`\>

Translation object

## Returns

`void`

## Example

```ts
// In b2c-cli initialization
registerTranslations('cli', 'de', {
  command: {
    sites: { description: 'Sites-Befehle' }
  }
})
```
