Configure language and regional settings for the web integration.
Set the language for Virtual Stadium during initialization or dynamically after the widget is loaded.
language string optional
The language code to use. Must be one of the supported language codes.
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.
When a specific translation is not available for a selected language, the widget falls back to English.
The widget can automatically detect the user's browser language preference:
navigator.language settingAuto-Detection:
// Automatic browser language detection
SIR('addWidget', '#sr-widget', 'match.lmtPlus', {
// No language specified - uses browser language
// ... widget props
});During Initialization:
// Set language when creating widget
SIR('addWidget', '#sr-widget', 'match.lmtPlus', {
language: 'de' // German
// ... widget props
});Change Dynamically:
// Change language after widget is loaded
SIR('setLanguage', 'fr'); // Switch to FrenchYou can provide custom translations or override existing translations for specific terms or phrases in your widgets.
To identify which strings are translatable and find their translation keys:
Use Debug Mode:
language: 'dbg' in your widget configurationOnce you have the translation key, search for it in the Translation Tool to customize the translation.
Debug Mode:
// Enable debug mode to see translation keys
SIR('addWidget', '#sr-widget', 'match.lmtPlus', {
language: 'dbg'
});