molecule icon indicating copy to clipboard operation
molecule copied to clipboard

内置的monaco-editor的右键菜单如何汉化

Open BySlin opened this issue 2 years ago • 2 comments

Question

image

如图

BySlin avatar Aug 31 '22 11:08 BySlin

我们调研一下解决方案,不确定这个好不好解决,因为我发现 monaco-editor 上 https://github.com/microsoft/monaco-editor/issues/784 这个挂了好几年没解决了

mortalYoung avatar Aug 31 '22 12:08 mortalYoung

我们调研一下解决方案,不确定这个好不好解决,因为我发现 monaco-editor 上 microsoft/monaco-editor#784 这个挂了好几年没解决了

可以试试使用 @monaco-editor/react 来加载编辑器,

import { loader } from "@monaco-editor/react";

// you can configure the locales
loader.config({ "vs/nls": { availableLanguages: { "*": "zh-cn" } } });

BySlin avatar Sep 15 '22 08:09 BySlin

此问题通过打包重写源码可以解决 链接地址

threefish avatar Oct 26 '22 01:10 threefish

此问题通过打包重写源码可以解决 链接地址

@BySlin 可以参考下这个朋友的方案

wewoor avatar Oct 26 '22 01:10 wewoor