Skip to content

Conversation

@Phoenix616
Copy link
Contributor

@Phoenix616 Phoenix616 commented Apr 23, 2019

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 locale config setting now acts as the default language when no locale is available for the player's locale or, if change-locale is 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

@mdcfe
Copy link
Member

mdcfe commented Apr 23, 2019

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.

@Phoenix616
Copy link
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.

@mdcfe
Copy link
Member

mdcfe commented Apr 23, 2019

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.

@mdcfe mdcfe added the type: enhancement Features and feature requests. label Apr 23, 2019
@mdcfe mdcfe self-assigned this Apr 23, 2019
@mdcfe mdcfe added this to the 2.18.0 milestone Apr 23, 2019
@mdcfe mdcfe mentioned this pull request Apr 19, 2020
6 tasks
@darbyjack darbyjack modified the milestones: 2.18.0, 3.0 May 13, 2020
@Chew Chew added the status: needs manual rebase Needs a manual local rebase due to base changes (regardless of what GH says) label Nov 25, 2020
@JRoy
Copy link
Member

JRoy commented Jan 12, 2022

Closed in favor of #4717

@JRoy JRoy closed this Jan 12, 2022
@TheKrafter TheKrafter mentioned this pull request Nov 24, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: needs manual rebase Needs a manual local rebase due to base changes (regardless of what GH says) type: enhancement Features and feature requests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Essentials localization based on player client language

5 participants