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

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

# Function: setLanguage()

> **setLanguage**(`lang`): `void`

Defined in: [packages/b2c-tooling-sdk/src/i18n/index.ts:217](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/i18n/index.ts#L217)

Set the language for translations.
Call this early in CLI initialization if --lang flag is provided.

## Parameters

### lang

`string`

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

## Returns

`void`

void

## Example

```ts
// In BaseCommand.init()
if (this.flags.lang) {
  setLanguage(this.flags.lang)
}
```
