如何本地化用作 vaadin 富文本区域工具提示的文本?
How can I localize the text used as tool tips of vaadin richtext area?
在 official documentation 他们建议使用 css 来本地化 vaadin 富文本区域的工具提示,它说:
Localizing RichTextArea Toolbars
The rich text area is one of the few components in Vaadin that contain
textual labels. The selection boxes in the toolbar are in English and
currently can not be localized in any other way than by inheriting or
reimplementing the client-side VRichTextToolbar widget. The buttons
can be localized simply with CSS by downloading a copy of the toolbar
background image, editing it, and replacing the default toolbar. The
toolbar is a single image file from which the individual button icons
are picked, so the order of the icons is different from the rendered.
The image file depends on the client-side implementation of the
toolbar.
.v-richtextarea-richtextexample .gwt-ToggleButton
.gwt-Image {
background-image: url(img/richtextarea-toolbar-fi.png)
!important;
}
我已经下载了工具栏背景图片。
我的问题是如何本地化用于富文本区域工具栏工具提示的字符串?或者是否有任何 vaadin 附加组件可以用作具有语言本地化功能的 Rich Text Area 的替代品?
尝试 Vaadin 插件 - CK Editor 的包装器。
Here 你可以找到在线演示。它会自动本地化为我的浏览器语言。
您可以在 official CKEditor site 上找到更多信息。
在 official documentation 他们建议使用 css 来本地化 vaadin 富文本区域的工具提示,它说:
Localizing RichTextArea Toolbars
The rich text area is one of the few components in Vaadin that contain textual labels. The selection boxes in the toolbar are in English and currently can not be localized in any other way than by inheriting or reimplementing the client-side VRichTextToolbar widget. The buttons can be localized simply with CSS by downloading a copy of the toolbar background image, editing it, and replacing the default toolbar. The toolbar is a single image file from which the individual button icons are picked, so the order of the icons is different from the rendered. The image file depends on the client-side implementation of the toolbar.
.v-richtextarea-richtextexample .gwt-ToggleButton
.gwt-Image {
background-image: url(img/richtextarea-toolbar-fi.png)
!important;
}
我已经下载了工具栏背景图片。 我的问题是如何本地化用于富文本区域工具栏工具提示的字符串?或者是否有任何 vaadin 附加组件可以用作具有语言本地化功能的 Rich Text Area 的替代品?
尝试 Vaadin 插件 - CK Editor 的包装器。
Here 你可以找到在线演示。它会自动本地化为我的浏览器语言。
您可以在 official CKEditor site 上找到更多信息。