
AuroraLib
Base plugin for every Aurora project. Provides common utilities and functions.
Список изменений
Per player localization support added
https://docs.auroramc.gg/aurora/per-player-localization
messages.yml is now messages_en.yml and you can create more using proper language codes like messages_de.yml for german.
Examples: en-US, en-UK, en, de, sk, hu
In this file, you can add a new section, named custom (which is already there if you do a fresh install:
custom:
stash-title: Item stash
prev-page: '&fPrevious Page'
npc:
quests: <white>Quests
These values are available in the plugin menus like item stash. You can reference them as {{stash-title}} or {{npc.quests}}. Notice the dot (.) notation for nested structures.
These are also exposed as PlaceholderAPI placeholders: %aurora_lang_<key>% for example: %aurora_lang_npc.quests%
This allows you to add per player localization to any plugin that supports PlaceholderAPI placeholders.
To enable per player localiaztion:
In your config.yml you have to:
- add the language codes you support in
supported-languages - choose your default language and set it to
localefield - set
use-per-player-localetotrue
And then you have to:
- grant the
aurora.core.user.languageto the players so they have access to the/language commandAfter all these, players will be able to use their desired language.
Notice that in config.yml the number-format section also have a locale value. That is only used when per player locale is disabled, otherwise it will use the player's selected locale.
