What's the new ui_i18n?

seems kibana6.6 remove ui_i18n.js, and there is no translations anymore.

return new kibana.Plugin({

  uiExports: {
    translations: [
      resolve(__dirname, './translations/zh_CN.json')
    ]
  },
});

what's the replacement in kibana6.6, I do not see the breaking change in release log

@whoami this seems to be an internal implementation change, and probably the reason why it isn't listed in the breaking changes doc.

Hey @whoami,

Yep, we changed the way Kibana and i18n work together. Before 6.6 the i18n approach was never fully supported, so that's probably why it wasn't mentioned in the release notes as a breaking change. But that has changed, please read this and this to know how to use i18n framework Kibana provides.

In short you don't need to define uiExports.translations anymore, just place zh-CN.json inside of your-plugin-folder/translations folder and it will be picked up automatically.

Note: please use BCP47 compatible locale name for both i18n.locale and JSON file name i.e. use dash instead of underscore.

Let me know if you have any questions regarding i18n.

Best,
Oleg

2 Likes

awesome

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.