ant-design-blazor / ueditor-blazor

A wysiwyg rich text web editor based on UEditor and Blazor.
https://ant-design-blazor.github.io/ueditor-blazor/
Apache License 2.0
47 stars 10 forks source link

How to use globalization (translate)? #20

Open rstreit opened 3 months ago

rstreit commented 3 months ago

How to translate to display descriptions and tooltips in another language (pt-br or at least en-us)?

ElderJames commented 3 months ago

Thanks for contacing us @rstreit , you can set up the language by add a attribute lang to the component.

<UEditor.Editor @ref="editor" @bind-Value="value" @bind-Html="html" Height="500" MinHeight="500" Width="700px" lang="en"/>

If you want to add other language, please trantlate the en files and put in wwwroot, then set up the langPath attribute to component.

<UEditor.Editor @ref="editor" @bind-Value="value" @bind-Html="html" Height="500" MinHeight="500" Width="700px" lang="pt-br" langPath="/i18n/" />

image

image