Skip to content

Proposals for changes in Locale & Language Manager #6

Open
@HSGamer

Description

@HSGamer

First way

  1. Load the locale defined in config.yml from the cloud as a Properties. If the locale is not found, load the default locale (English)
  2. Put the key-value pairs of the Properties to language.yml
  3. The plugin will use language.yml to get & set messages

The users have full control of the language, and if there is a change in the messages, we can just update it in language.yml.
The drawback is that they must remove language.yml and let the plugin refresh it if they want to get the updated translated messages or change the locale.

Second way

  1. Load the locale defined in config.yml from the cloud as a Properties. If the locale is not found, load the default locale (English).
  2. Store the Properties in a temporary location.
  3. language.yml is empty & only contains overridden strings for the Properties.
  4. When getting a message, the plugin first check if there is a path in language.yml. If it's found, load it; otherwise, get the message in the Properties.

language.yml is smaller in file size as it only contains the replacement of the messages in the locale file. If there is a change in the messages, we can simply update the locale file.
The drawback is that the users have to find the correct path to set in language.yml if they want to replace a line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionneeds some discussion about it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions