Skip to content

v0.0.1

Pre-release
Pre-release

Choose a tag to compare

@ChernegaSergiy ChernegaSergiy released this 04 Feb 15:30
· 10 commits to main since this release
ef0fec0

libLanguage v0.0.1

This is the initial public release of the libLanguage virion, providing a structured way to handle localizations in PocketMine-MP plugins.

Features

  • Centralized Language Management: A LanguageHub singleton that acts as a central registry for all language-related operations and plugin registrations.
  • Per-Plugin Localization: The PluginTranslator class ensures that each plugin maintains its own isolated translation context.
  • Extensible Locale Resolution: Includes a LocaleResolverInterface with a DefaultLocaleResolver that automatically detects a player's language via Player::getLocale().
  • Placeholder Integration: Built-in support for custom placeholders (e.g., %player%) and seamless integration with the PlaceholderAPI plugin.
  • Locale Validation: A predefined list of 29 valid Minecraft locales to ensure consistency across translations.
  • Data-Driven Translations: A simple Language data class to encapsulate locale-specific translation keys and values.

Installation

You can include this virion in your project by adding it to your .poggit.yml:

libs:
  - src: newlandpe/libLanguage/libLanguage
    version: ^0.0.1

License

This library is licensed under the CSSM Unlimited License v2.0 (CSSM-ULv2).