mirror of
https://github.com/aikar/commands.git
synced 2026-06-21 06:20:37 +00:00
Updated Locales (markdown)
+13
@@ -75,3 +75,16 @@ So if you need to use non English language for ACF, then simply ensure you load
|
||||
```java
|
||||
manager.getLocales().setDefaultLocale(locale);
|
||||
```
|
||||
|
||||
## Locale References
|
||||
Java provides a few constants in the Locale class. ACF has taken that concept and built an even larger constant pool for more languages in `Locales`
|
||||
|
||||
So if you need a reference to a Locale, you may use `Locales.SPANISH` for example. This should behave the same as doing `new Locale("es")`.
|
||||
|
||||
## Adding more languages to ACF
|
||||
Simply PR new files to the `languages` folder following same pattern as the others. Then in `CommandManager.java` add the language to the `supportedLanguages` Set at the top.
|
||||
Please use a reference to the Locales class, adding a Locale if the locale is missing.
|
||||
|
||||
I am wanting to keep it to just root languages for now, and not country-specific dialects.
|
||||
|
||||
You can load country specific versions using the API. We do not need it in core.
|
||||
Reference in New Issue
Block a user