LangSwitch


#1

This is a translation service provider for sponge plugins.

Active integration is required!

The translations for a plugin will be stored in server\configs\pluginID\Lang\locale.lang.

The plugin dev can get LangSwitch as service provider similar to an economy service.

The for the translation-object the plugin author only has to call translations.local("translation.path").resolve(player).orElse("Plugin default value");
where a translation path is structured like permissions with only lowercase alpha-numeric letters and underscores, grouped by dots.

For more information and a download visit the GitHub
This release was written for API 7, but as I’m not using much of Sponges API I don’t see why it shouldn’t work on API 5/6

I’ll use it for all my future plugin releases and it would be cool if some other people would join this project :slight_smile:


#2

So just strings then; no Text?


#3

translation.localText() will return a text and is able to handle Text replacements.


#4

In our continuing effort to phase out the Plugin Releases category, this thread is being locked because the plugin is already listed on Ore.

Check it out: https://ore.spongepowered.org/DosMike/LangSwitch


#5