0.11 was released a few weeks ago. New feature was added. Language support. I noticed that PocketMine support languages, but I am not sure how to get a player's language. Can someone show some code example on how to get a player's language?
Hmm... And how can PocketMine send translated messages to the client? I think they are translated by PocketMine and not from MCPE. Maybe a new UDP packet to send language data has been implemented on MCPE 0.11.0
I saw this setting in pocketmine.yml ... Code: settings: #Three-letter language code for server-side localization #Check your language code on https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes language: "spa" #Whether to send all strings translated to server locale or let the device handle them force-language: false
PocketMine sends the translation codes (e.g. discoonectReason.serverFull) plus the arguments. See https://github.com/pocketmine/pocke...ocketmine/network/protocol/TextPacket.php#L76 for proof that PocketMine sends the parameters in a different place.
no dont do that That is very annoying what country dont mean you will prefer your country language the best is when a player register ask them what they prefer
This could be used to redirect a player to a server in their own country, for lower pings so less lag for the player.
Use an AsyncTask to query the player's country from an online API like http://ipinfo.IO Though, IP may not always be accurate.
Well you can always do that, just many players have friends that live close to them, and everyone prefers less lag.
well that will never work for a meetup like youtuber meetup and not all friends live close like internet friends
Alright then allow them to choose where they want to go, because most players aren't playing with friends... People prefer less lag without having to do anything to get it except join.