diff --git a/Locales.md b/Locales.md index f0a086a..aa954c4 100644 --- a/Locales.md +++ b/Locales.md @@ -72,6 +72,7 @@ ACF defaults to English as the default Locale as that is what we provide languag Currently, only the default locale is used to look up messages, as we have not completed the work yet to do per-player contextual Locales. So if you need to use non English language for ACF, then simply ensure you load messages completely for your language, and then call: + ```java manager.getLocales().setDefaultLocale(locale); ``` @@ -116,7 +117,9 @@ Then call `manager.setPlayerLocale(player, preferredLocale)`, and that language ## Using I18N Keys in Annotations If the value passed to one of your annotations needs to also be translated, you may use the following syntax: -`@Description("{@@my-plugin.cmd-help.mycommand}")` +```java +@Description("{@@my-plugin.cmd-help.mycommand}") +``` The `{@@}` portion will be replaced with whatever is in your Locales language tables.