Skip to content

dima-dencep/TranslationFallbacks

Repository files navigation

Translation Fallbacks

A library that allows translations to have multiple fallbacks (primarily for Emotecraft)

Usage

Define translation keys with a default fallback and optional language-specific fallbacks:

{
  "translate": "translation.key",
  "fallback": "default", // vanilla behavior (fallback for all)
  "fallbacks": { // Separated into its own field to avoid breaking compatibility with vanilla
    "ru_ru": "дефолт" // fallback for ru_ru
  }
}

For detailed examples and test cases, refer to the unit tests.

Adventure

This library also supports Adventure! To use it, apply the patcher from the Adventure subproject! But keep in mind that Adventure does nothing with fallbacks, so you'll have to implement that yourself.

About

A library that allows translations to have multiple fallbacks (primarily for Emotecraft)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages