v5 中的 TinyMCE 英语国际化 (i18n)
TinyMCE English Internationalization (i18n) in v5
升级 TinyMCE
时,我注意到在 i18n 的最新版本(5.2.0
)中缺少 en.js
,而在版本 4 中情况并非如此(请参阅DOWNLOAD - no way add this otherwise). According to docs v5#localization#language (US) English is by default but there's no English in the language pack for v5, does it means that we don't need to include this in the tinymce/langs
(for self-hosting)? Couldn't find anything about this in the changelog.
编辑器默认为美国英语,因此美国英语不需要语言包。如果您想更改美国英语的任何默认字符串,您当然可以创建一个文件并根据需要更改值。如果您不想更改默认值,则不需要文件中的字符串。例如,您可以创建自己的 en_US.js
文件,只包含几个字符串:
tinymce.addI18n('en_US',{
"Formats": "Custom Formats Text",
"Font Sizes": "Custom Font Size Text",
"Clear formatting": "Custom Clear Formatting Text",
"Keep Formatting": "Custom Keep",
"Remove Formatting": "Custom Remove"
});
升级 TinyMCE
时,我注意到在 i18n 的最新版本(5.2.0
)中缺少 en.js
,而在版本 4 中情况并非如此(请参阅DOWNLOAD - no way add this otherwise). According to docs v5#localization#language (US) English is by default but there's no English in the language pack for v5, does it means that we don't need to include this in the tinymce/langs
(for self-hosting)? Couldn't find anything about this in the changelog.
编辑器默认为美国英语,因此美国英语不需要语言包。如果您想更改美国英语的任何默认字符串,您当然可以创建一个文件并根据需要更改值。如果您不想更改默认值,则不需要文件中的字符串。例如,您可以创建自己的 en_US.js
文件,只包含几个字符串:
tinymce.addI18n('en_US',{
"Formats": "Custom Formats Text",
"Font Sizes": "Custom Font Size Text",
"Clear formatting": "Custom Clear Formatting Text",
"Keep Formatting": "Custom Keep",
"Remove Formatting": "Custom Remove"
});