---
title: "Localization"
canonical_url: "https://apidocs.sportradar.com/resources/virtual-stadium/docs/web/localization"
markdown_url: "https://apidocs.sportradar.com/resources/virtual-stadium/docs/web/localization.md"
last_updated: "2026-03-24T14:01:26Z"
---

# Localization

Configure language and regional settings for the web integration.

## Configuration

Set the language for Virtual Stadium during initialization or dynamically after the widget is loaded.

### Parameters

**`language`** *string* **optional**

The language code to use. Must be one of the [supported language codes](https://apidocs.sportradar.com/resources/virtual-stadium/docs/gettingStarted/localization.md#supported-languages).

### Default Language

If no language is specified, Virtual Stadium defaults to **English** (`en`). The widget will automatically detect and use the browser's language if it matches one of the supported languages.

### Language Fallback

When a specific translation is not available for a selected language, the widget falls back to English.

### Browser Language Detection

The widget can automatically detect the user's browser language preference:

- Reads the browser's `navigator.language` setting
- Matches it against supported languages
- Falls back to English if no match is found

***Auto-Detection:***

```javascript
// Automatic browser language detection
SIR('addWidget', '#sr-widget', 'match.lmtPlus', {
  // No language specified - uses browser language
  // ... widget props
});
```

***During Initialization:***

```javascript
// Set language when creating widget
SIR('addWidget', '#sr-widget', 'match.lmtPlus', {
  language: 'de' // German
  // ... widget props
});
```

***Change Dynamically:***

```javascript
// Change language after widget is loaded
SIR('setLanguage', 'fr'); // Switch to French
```

***

## Custom Translations

You can provide custom translations or override existing translations for specific terms or phrases in your widgets.

### Finding Translation Keys

To identify which strings are translatable and find their translation keys:

**Use Debug Mode:**

- Set `language: 'dbg'` in your widget configuration
- All translatable strings will display as their translation keys
- Strings appearing as keys in debug mode can be translated
- Strings without keys are not translatable

Once you have the translation key, search for it in the Translation Tool to customize the translation.

***Debug Mode:***

```javascript
// Enable debug mode to see translation keys
SIR('addWidget', '#sr-widget', 'match.lmtPlus', {
  language: 'dbg'
});
```

![Translation Tool Example](https://apidocs.sportradar.com/resources/virtual-stadium/static/static/img/VS-custom-translations.png)
