Localization
Localization (i18n)
The forum includes a basic translation system managed from the admin dashboard.
- Create translation files in
lang/(e.g.,lang/en.json,lang/it.json) - Each file is a JSON object of key => translated string
- Go to Admin Panel → Settings to configure:
- Default Language: the language used by default
- Available Languages: comma-separated list of enabled language codes
- Use
t('key')in views and index.php to output translated strings
The forum ships with English (lang/en.json). Additional languages can be added as lang/<code>.json and enabled in Admin Panel → Settings → Available Languages.
Translation File Format
Each language file is a JSON object mapping string keys to string values:
{
"site_name": "bulletinbored",
"home": "Home",
"login": "Login",
"logout": "Logout"
}
Uploaded language files are validated as a JSON object of string keys/values; a PHP file is no longer accepted (translation files are parsed as data, never executed).
Using Translations
In views and index.php:
<?= t('home') ?>
With parameters:
<?= t('reply_notification_subject', ['title' => $threadTitle]) ?>
Managing Languages
- Upload new language files from Admin Panel → Languages
- Delete installed language files from Admin Panel → Languages (except the default language)
- Language files can also be uploaded via ZIP from the Plugin Manager if they’re bundled as part of a localization pack