Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by PhilB2305, Feb 25, 2020.
Hello, is there any way i can get the gamelangue of a player for a langue system
so now how can i check the langue so like when its german than the win message is "du hast das Spiel gewonnen" or when it is Englisch its "
you won the game" or when its turkey its "
Using the Locale of the player you can then specify what message to show them. Spigot does not have a translating API built in so you will have to specify all the languages you would like to support and save each version of that message (in each language you'd like to support) in some kind of config.
Then, say the Locale comes back to be German, you can then display the german message.
You could test what does each string say when certain language is selected then just make a switch for all of the variations you want to have and put default so you have solution for the ones you didnt include, and in each case you just send different messages.