Implement per player locale (Implements #2029)#2502
Closed
Phoenix616 wants to merge 1 commit intoEssentialsX:2.xfrom
Closed
Implement per player locale (Implements #2029)#2502Phoenix616 wants to merge 1 commit intoEssentialsX:2.xfrom
Phoenix616 wants to merge 1 commit intoEssentialsX:2.xfrom
Conversation
Member
|
Thanks for the PR! However, due to incoming changes to how messaging works (#2391) in 2.18.x and our current schedule, this likely will not be merged into 2.x until after 2.17.0. |
Contributor
Author
|
Is there any place where the schedule is laid out? Or is that just an internal thing? Also this might be a good base for some of the ideas laid out regarding messaging changes, especially for the PlaceholderAPI support as it switches the messaging system from a global translator to a per-user translator which could the handle the PlaceholderAPI integration. |
Member
|
You can see loosely what the plans are for versions at the milestones. This PR could definitely serve as a base to build on for any changes in #2391. |
Member
|
Closed in favor of #4717 |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements a per-player locale system like requested in #2029 which uses the client's language setting by default and adds a command to allow players to change their own locale on the server without changing the client language. The original
localeconfig setting now acts as the default language when no locale is available for the player's locale or, ifchange-localeis disabled in the config behaves exactly like before using the same locale for all players (should be default with an old config).This change goes along with moving all translations that get send from the static I18n.tl method to one provided by the User/CommandSource to get translations depending on the selected locale and also a convenience method sendTl to directly send translations.
Edit: Forgot to mention it: This also includes a provider for getting the client's locale on older versions that didn't include the locale API to keep this functionality backwards compatible.
Closes #2029