Open
Description
First way
- Load the locale defined in config.yml from the cloud as a
Properties
. If the locale is not found, load the default locale (English) - Put the key-value pairs of the
Properties
to language.yml - 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
- Load the locale defined in config.yml from the cloud as a
Properties
. If the locale is not found, load the default locale (English). - Store the
Properties
in a temporary location. - language.yml is empty & only contains overridden strings for the
Properties
. - 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.