It's easy to bundle your language resources to java bean.
If you don't config the bean class, we'll bundle to LinkedHashMap
.
Java Code
Kotlin Code
Add Language Resource
en_us.yml
locate in language
:
zh_cn.yml
locate in language
:
Bundle To Bean
By configuring plugin-spec.yml
, If you don't config the bean class, we'll bundle to LinkedHashMap
.
language-bundle-name: runflow.KotlinLanguageBundle
To bundle to bean, the field
languageType
andINSTANCE
is required, and if the bundle id has default value for current language type, you don't write the language resource file, like this example, we don't needen_us.yml
in fact.