Skip to content

Latest commit

 

History

History
33 lines (18 loc) · 1.06 KB

bundle_language.md

File metadata and controls

33 lines (18 loc) · 1.06 KB

Bundle Language To Bean

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

JavaLanguageBundle.java

Kotlin Code

KotlinLanguageBundle.kt

Add Language Resource

en_us.yml locate in language:

en_us.yml

zh_cn.yml locate in language:

zh_cn.yml

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 and INSTANCE 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 need en_us.yml in fact.