Always translate server-side #6626
Labels
Category: Network
Related to the internal network architecture
Category: UI
Related to the user interface (e.g. commands, terminal output)
Type: Cleanup
Removes or deprecates API methods or behaviour
Type: Enhancement
Contributes features or other improvements to PocketMine-MP
Problem description
We currently rely on the client to translate strings presumed to be present in the vanilla files (anything not prefixed with
pocketmine.
).We also don't take any information from the client about its selected language.
This is problematic for a few reasons
pocketmine.
aren't present in the client (a list of those as of 1.21.60: https://github.com/pmmp/Language/blob/stable/.github/workflows/known-bad-keys.json)Proposed solution
We should use the locale provided in
LoginPacket
to decide the server-side language used to translate messages.However, this is tricky due to the different codes used (we use 3-letter codes like
eng
while the client uses locale codes likeen_US
).This is really two issues in one, but we can't do fully server-sided translation without tying it to client-provided locale.
Alternative solutions or workarounds
No response
The text was updated successfully, but these errors were encountered: