Setup and Run i18n-plugin
i18n-plugin needs to run on OpenSearch Dashboards. Therefore, we also need to setup for OpenSearch and OpenSearch Dashboards.
Environment Setup
- Download OpenSearch. You could clone the OpenSearch repo, use docker or artifact. Make sure the version matches the OpenSearch Dashboards version.
- Setup the environment to run OpenSearch Dashboards. You will need to install node.js, nvm, and yarn in your environment to properly pull down dependencies to build and bootstrap.
- Download the OpenSearch-Dashboards source code.
See the OpenSearch Dashboards developer guide for more instructions on setting up your development environment.
- Change your node version to the version specified in
.node-versioninside the OpenSearch-Dashboards root directory. - cd into the
pluginsdirectory of the OpenSearch-Dashboards source code directory. Clone i18n-plugin into thepluginsdirectory. Ultimately, your directory structure should look like this:
.
├── OpenSearch-Dashboards
│ └── plugins
│ └── i18n-plugin
- Config localization in i18n-plugin. Add a locale json file in
translationsdirectory of the i18n-plugin. Specify the path in.i18nrc.json. For example, if the locale json file you added is calledzh-CN.json, the path should be"translations": ["translations/zh-CN.json". - Config localization in OpenSearch Dashboards. cd into the
configdirectory of the OpenSearch-Dashboards source code directory. Addi18n.locale: "{your locale}"inopensearch_dashboards.ymlfile. - Run
yarn osd bootstrapunderOpensearch-Dashboards.
Run
-
yarn start -
Starts OpenSearch-Dashboards and includes this plugin. A localized OpenSearch-Dashboards will be available on
localhost:5601. - Please run in the OpenSearch-Dashboards root directory
- You must have OpenSearch running.