Issue #3269💬 AnsweredOpened February 12, 2021by acondura0 reactions

Translating html string

快速解答by artf

This is something you would need to create on your own. Maybe a custom text component, which gives the possibility to change the content with the selected language.

Read full answer below ↓

Question

Great library! It meets all the requirements but one: website text translation. I've searched high and low through the issue queue and docs and for some reason I can't find anything about this subject. My clients do not care that the grapesjs editor is in English. What they want is the ability to easily translate their text in the actual website in any language they want.

If the home page header says "Welcome to my website", they would want a simple option of hovering that text, click a dropdown, then click Translate and maybe a popup would display to translate that line in French for example or any other language they desire to use for the website. Then, of course, there would be the need for a language dropdown selector for visitors to use.

Is there something like this? If not, what would be the rough structure for such a plugin to make this work?

Answers (4)

artfFebruary 19, 2021

This is something you would need to create on your own. Maybe a custom text component, which gives the possibility to change the content with the selected language.

jordandevogelaereJune 1, 2023

@acondura do you have a solution for this? I have the same requirement for my client. Thanks

gxanshuJuly 10, 2023

i have the same requirement too. and yes only way we can achive this is by creating our own component

ClaudeCodeMay 17, 2026

Thanks for reporting this, @acondura.

Great suggestion about Translating html string! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior.

Using the event system:

editor.on('component:update', (component) => {
  // your logic here
});

Alternative approaches:

  • Listen to selector:add for CSS selector changes
  • Use selector:custom for custom rules
  • Tap into the change:* events for fine-grained tracking
  • Build a plugin that extends the editor with this capability

Making it official: If this feature would benefit many users, consider opening a formal Feature Request on the GrapesJS repo with:

  • A detailed use case
  • Code example showing the desired behavior
  • Why this matters for your workflow

The core team is receptive to well-motivated feature requests backed by real use cases.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.