From 1eaa3826d4bb8b228cf2bfebf3b9ddac8e343f6a Mon Sep 17 00:00:00 2001 From: Commander Tvis <38042667+CommanderTvis@users.noreply.github.com> Date: Mon, 10 Dec 2018 00:47:23 +0700 Subject: [PATCH] Fence code by ```...``` --- Locales.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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.