Skip to content

Custom Locales and Effective Locales #10254

@davidmayr

Description

@davidmayr

Is your feature request related to a problem?

The Adventure Global Translator is an awesome feature and I love how it is automatically integrated and translates messages in various parts of paper (entity names, messages etc.)

However, when you have a custom language plugin one might want to sync the language of all other plugins and the global translator to the custom language you have stored in e.g. your database.

Describe the solution you'd like.

An API like I implemented in Velocity a few years back: PaperMC/Velocity#537

This would allow all plugins to read the effective locale (a custom locale, the locale of the client or Locale.US) and provide the ability change it. getLocale() and locale() would be untouched.

This allows plugins to still read the players configured language but also allows plugins to change what language should be used.

Describe alternatives you've considered.

Changing the language via NMS. But that's a bit hacky, and I'd like a proper solution

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueSimple bug fix or feature which would be a good first PR for someone new to the projectstatus: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.type: featureRequest for a new Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions