首页 > 解决方案 > CKeditor 更改语言不起作用(未将语言更改为英语)

问题描述

嗨,我想将我的 ckeditor 的语言更改为英语。但是我不确定为什么它不能翻译成英文。有人能帮我吗?我试过 put lang: "en" 但不起作用。我不确定我的配置需要更改什么。请帮忙。我是新的

这是代码:

https://codesandbox.io/s/elastic-borg-u4cih?file=/index.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Static Template</title>
    <script src="https://dl.dropboxusercontent.com/s/hb9vf8r4vz7imyy/ckeditor.js"></script>
  </head>
  <body>
    <textarea name="content" class="editor">
          Edit me  c:
       </textarea
    >
  </body>
  <script>
    ClassicEditor.create(document.querySelector(".editor"), {
      toolbar: {
        items: [
          "|",
          "bold",
          "italic",
          "link",
          "bulletedList",
          "numberedList",
          "|",
          "indent",
          "outdent",
          "|",
          "imageUpload",
          "blockQuote",
          "mediaEmbed",
          "undo",
          "redo"
        ]
      },
      language: "de",
      image: {
        toolbar: ["imageTextAlternative", "imageStyle:full", "imageStyle:side"]
      },
      licenseKey: ""
    })
      .then((editor) => {
        window.editor = editor;
      })
      .catch((error) => {
        console.error("Oops, something went wrong!");
        console.error(
          "Please, report the following error on https://github.com/ckeditor/ckeditor5/issues with the build id and the error stack trace:"
        );
        console.warn("Build id: ref2goguw78q-8ghiwfe1qu83");
        console.error(error);
      });
  </script>
</html>

标签: ckeditor

解决方案


推荐阅读