mirror of
https://github.com/aikar/commands.git
synced 2026-06-14 20:00:37 +00:00
Fence code by ``...``
+4
-1
@@ -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 `{@@<key>}` portion will be replaced with whatever is in your Locales language tables.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user