... | ... | @@ -145,3 +145,16 @@ The code below basically tells the Language API to fetch the language from the * |
|
|
```
|
|
|
|
|
|
Now, this is ofcourse the easy way. You can also do it a bit different by creating your own ILanguageManager instance. To then use reflection to change the languageManager field in the BUAPI instance.
|
|
|
```java
|
|
|
// Creating new ILanguageManager instance
|
|
|
ILanguageManager languageManager = new YourCustomLanguageManager();
|
|
|
|
|
|
// Getting languageManager field.
|
|
|
Field languageManagerField = ReflectionUtils.getField(BUCore.getApi().getClass(), "languageManager");
|
|
|
try {
|
|
|
// Attempting to update languageManager field to new, custom, ILanguageManager instance.
|
|
|
languageManagerField.set(BUCore.getApi().getClass(), languageManager);
|
|
|
} catch (IllegalAccessException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
``` |
|
|
\ No newline at end of file |