NOTE : Package no longer supported. Please use monaco-editor-i18n-plugin
to instead.
nls: National Language Support
This package is designed for utilizing zh-CN in [email protected]
or [email protected]
.
The Chinese localization JSON file /i18n/dt-zh-hans.json
is a simplified version of vscode-loc and This is only relevant to DTStack and it supply the nls.js
to replace the monaco-editor/esm/vs/nls.js
.
npm install dt-monaco-editor-nls-webpack-plugin -D
ko.config.js
ko - Project toolkit for React Applications
const plugin = [
...,
{
key: 'WebpackPlugin',
action: 'add',
opts: {
name: 'DTMonacoEditorNlsWebpackPlugin',
fn: () => {
return new DTMonacoEditorNlsWebpackPlugin();
},
},
}
]
webpack.config.js
const DTMonacoEditorNlsWebpackPlugin = require("dt-monaco-editor-nls-webpack-plugin");
module.exports = {
...,
plugins: [new DTMonacoEditorNlsWebpackPlugin()],
...,
};
Our monaco-editor version: 0.30.1
or 0.31.1
.
If you need the support zh-CN or other languages, you can fork this repository, locate your json file in vscode-loc and move it to /i18n/***.json
. Additionally, you will need to modify the code with the json file path in nls.js
.