Internationalization (I18N)
Based on YMPv2.0 framework I18N support, integrates WebMVC module and provides default II18NEventHandler interface implementation, configuration method:
// 指定WebMVC模块的I18N资源管理事件监听处理器 ymp.i18n_event_handler_class=net.ymate.platform.webmvc.support.I18NWebEventHandler // 语言设置的参数名称,可选参数,默认为空 ymp.params._lang=_lang // 资源文件存放路径,可选参数,默认为${root}/i18n/ ymp.params.i18n_resources_home=${root}/i18n/
Load the current language Setting steps:
- Try to load the
_lang
parameters in the request scope;- Try to load the framework custom configuration
ymp.params. _lang
parameters;- Try to load the
_lang
parameters from Cookies;- Use the system default language setting;