The mBackupSystem plugin now includes a comprehensive translation system that supports multiple languages. All messages and logs can be displayed in either Russian or English.
- English (en) - Default language
- Russian (ru)
- Turkish (tr)
To change the plugin language, edit the config.yml file and set the language parameter:
# For Russian (default)
language: ru
# For English
language: en
# For Turkish
language: trThe MessageManager class handles all translation functionality:
- Loads the appropriate language file based on the configuration
- Provides methods to retrieve translated messages
- Supports message placeholders for dynamic content
Translation files are located in src/main/resources/:
messages_ru.yml- Russian translationsmessages_en.yml- English translations
All messages use standardized keys organized by category:
command.usage- Command usage helpcommand.reload.initiated- Reload initiated messagecommand.start.initiated- Manual backup start message
plugin.loading.configuration- Configuration loading messageplugin.loaded.backup_started- Plugin loaded messageplugin.tasks.started- Tasks started messageplugin.shutdown.backup_started- Shutdown backup messageplugin.command.not_found- Command not found error
backup.task.started- Scheduled task startedbackup.dir.using_main- Using main directorybackup.dir.using_plugin- Using plugin directorybackup.dir.created- Directory createdbackup.dir.failed- Directory creation failedbackup.worlds.list_empty- Empty world list warningbackup.worlds.started- Backup process startedbackup.worlds.completed- All backups completedbackup.world.started- Individual world backup startedbackup.world.completed- Individual world backup completedbackup.world.error- Backup error
delete.folder_not_found- Backup folder not founddelete.started- Cleanup starteddelete.file_deleted- File deleteddelete.file_failed- File deletion faileddelete.completed- Cleanup completed
debug.backup_dir- Backup directory pathdebug.worlds_count- Number of worldsdebug.world_index- World indexdebug.world_processed- World processeddebug.backup_start- Backup startdebug.world_folder- World folder pathdebug.archive_creating- Archive creationdebug.folder_info- Folder informationdebug.file_info- File informationdebug.delete_checking- Delete check information
// Simple message
String message = plugin.getMessageManager().getMessage("backup.worlds.started");
plugin.getLogger().info(message);
// Message with placeholders
String message = plugin.getMessageManager().getMessage(
"backup.world.started",
"{world}", worldName
);
plugin.getLogger().info(message);
// Multiple placeholders
String message = plugin.getMessageManager().getMessage(
"backup.world.completed",
"{archive}", archiveName,
"{duration}", String.valueOf(duration)
);
plugin.getLogger().info(message);Messages can contain placeholders that are replaced with actual values:
{world}- World name{path}- File path{time}- Time value{duration}- Duration in milliseconds{archive}- Archive name{error}- Error message{days}- Number of days{count}- Count value{size}- Size value{age}- Age value{file}- File name{entry}- Entry name{index}- Index value
To add support for a new language:
- Create a new message file:
messages_<lang_code>.yml - Copy the structure from
messages_en.ymlormessages_ru.yml - Translate all message values to the new language
- Update the
config.ymlto support the new language code - Update the MessageManager if needed to handle the new language
| Setting up backup directory...
| Using root directory /backups/
| ✅ Folder created: /backups
| Plugin loaded. Started world backup...
| Starting sequential world backup...
| -----------------------------
| Started backup of world: world
| ✅ Backup created: world_2025-01-05_18-00-00.zip (5432 ms)
| Настройка директории бэкапов...
| Используется корневая директория /backups/
| ✅ Папка создана: /backups
| Плагин загружен. Начат бэкап миров...
| Запуск последовательного бэкапа миров...
| -----------------------------
| Начат бэкап мира: world
| ✅ Бэкап создан: world_2025-01-05_18-00-00.zip (5432 ms)
| Yedekleme dizini ayarlanıyor...
| Kök dizin kullanılıyor: /backups/
| ✅ Klasör oluşturuldu: /backups
| Eklenti yüklendi. Dünya yedeklemesi başlatıldı...
| -----------------------------
| Dünya yedeklemesi başladı: world
| ✅ Yedek oluşturuldu: world_2026-01-07.zip (4200 ms)
- Easy Localization: All messages are centralized in language files
- Maintainability: Adding or modifying messages is simple
- Consistency: All messages follow the same format
- Flexibility: Easy to add new languages
- User-Friendly: Users can choose their preferred language
- The language setting can be changed at any time by editing
config.yml - Use the
/mBackupSystem reloadcommand to apply language changes without restarting the server - If a message key is not found, the key itself is returned as the message
- Debug messages are also fully translated