Skip to main content
Logo
Explore APIsContact Us
  • Home
  1. Resources
  2. Virtual Stadium
  3. Localization

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.

#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
Last updated 13 days ago
Is this site helpful?
Virtual Stadium, Moderation, Engagement Tools
ThemingAndroid
On this page
  • Configuration
  • Parameters
  • Default Language
  • Language Fallback
  • Browser Language Detection
  • Custom Translations
  • Finding Translation Keys