Internationalization (i18n)
Configuring your language
If you would like to have Bright render in a lang other than English, then you need to set your WordPress Language. This is done by changing the WPLANG in wp-config.php.
define('WPLANG', 'de-DE');
To test that there\'s a valid Bright language library loaded, check from your browser javascript console:
Your WPLANG setting must match a valid Bright language. After changing WPLANG, you may need to refresh the page and/or clear your cache.
Creating new languages
If your language is not available, it is possible to add your own by editing bright.lang.js or by loading a separate JavaScript file after bright.lang.js containing something similar to the following:
Bright.lang['de'] = {
'Launch course': 'Starten',
'Launching course...': 'Kurs starten...',
'Loading Bright!': 'Laden Bright!',
'Retrieving launch URL...': 'Abrufen Start URL...',
'Retrieving launch registration and URL ...': 'Abrufen Start URL...',
'The maximum number of registrations for this account has been reached. ': 'Die maximale Anzahl der Anmeldungen für dieses Konto wurde erreicht.',
'Completion': 'Status',
'complete': 'abgeschlossen',
'completed': 'abgeschlossen',
'unknown': 'offen',
'incomplete': 'in bearbeitung',
'failed': 'nicht bestanden',
'passed': 'bestanden',
'Total Time': 'Gesamtzeit',
'Attempts': 'Versuche',
'Success': 'Erfolg',
'Score': 'Testergebnis'
};
Bright.lang['de-DE'] = Bright.lang.de; // use de-DE in WPLANG variable, for example
Using Bright.lang from JavaScript
Access to the internationalizations functions are via the Bright.t() function:
Bright.t('Launching course...');