Installations
npm install monaco-editor-locales-plugin
Developer Guide
Typescript
No
Module System
N/A
Min. Node Version
>=0.12.0 || >= 4.3.0 < 5.0.0 || >=5.10
Node Version
8.11.3
NPM Version
5.6.0
Score
77.3
Supply Chain
94.5
Quality
75.4
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
xxxxst
Download Statistics
Total Downloads
7,788
Last Day
5
Last Week
24
Last Month
100
Last Year
1,490
GitHub Statistics
6 Stars
10 Commits
6 Forks
2 Watching
1 Branches
1 Contributors
Bundle Size
374.00 kB
Minified
95.77 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.0.3
Package Id
monaco-editor-locales-plugin@0.0.3
Unpacked Size
416.78 kB
Size
104.37 kB
File Count
15
NPM Version
5.6.0
Node Version
8.11.3
Total Downloads
Cumulative downloads
Total Downloads
7,788
Last day
-16.7%
5
Compared to previous day
Last week
-22.6%
24
Compared to previous week
Last month
-11.5%
100
Compared to previous month
Last year
17.6%
1,490
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
monaco-editor-locales-plugin
A webpack plugin for monaco-editor locales setting
https://github.com/xxxxst/monaco-editor-locales-plugin
Install
1npm install --save-dev monaco-editor-locales-plugin
Usage
webpack config
1module.exports = { 2 ... 3 plugins: [ 4 new MonacoLocalesPlugin({ 5 /** 6 * support languages list, .eg ["de"] 7 * embed language base on monaco-editor@0.14.6 8 * all available embed languages: de,es,fr,it,ja,ko,ru,zh-cn,zh-tw 9 * just add what you need to reduce the size 10 */ 11 languages: [], 12 /** 13 * default language name, .eg "de" 14 * use function string to set dynamic, .eg "getLanguageSetting()" 15 */ 16 defaultLanguage: "", 17 //defaultLanguage: "getLanguageSetting()", 18 /** 19 * log on console if unmatched 20 */ 21 logUnmatched: false, 22 /** 23 * self languages map, .eg {"zh-cn": {"Find": "查找", "Search": "搜索"}, "de":{}, ... } 24 */ 25 mapLanguage: {}, 26 }) 27 ] 28}
if the param "defaultLanguage" set as a function,it will be called at the monaco-editor library loaded.
therefore if the user want to change language,they need to refresh the page.
html code usage:
1<html> 2 <head> 3 <script language="javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script> 4 <script language="javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> 5 6 <script type="text/javascript"> 7 //save data before refresh 8 $.cookie('language', "zh-cn"); 9 10 //make sure that the function be declared before monaco-editor lib loaded 11 function getLanguageSetting(){ 12 return $.cookie('language'); 13 } 14 </script> 15 16 <!-- monaco-editor lib --> 17 <script language="javascript" src="./static/js/vendor.dll.js"></script> 18 ... 19 </head> 20</html>
important
This is not the best way to do it. Because this is a direct change to monaco-editor's source code- "monaco-editor/esm/vs/nls.js",License
Copyright (c) 2018-present, xxxxst
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 1/8 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 3 are checked with a SAST tool
Score
3.2
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More