Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

DTStack/dt-monaco-editor-nls-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE : Package no longer supported. Please use monaco-editor-i18n-plugin to instead.

dt-monaco-editor-nls-webpack-plugin

NPM Status

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.

Install

npm install dt-monaco-editor-nls-webpack-plugin -D

Using

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()],
    ...,
};

Notice

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.

About

Simplified Chinese Support For Monaco Editor

Resources

License

Stars

Watchers

Forks

Packages

No packages published