Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looking for a way to update i18n messages #2868

Closed
sandrooco opened this issue Nov 11, 2024 · 2 comments
Closed

Looking for a way to update i18n messages #2868

sandrooco opened this issue Nov 11, 2024 · 2 comments

Comments

@sandrooco
Copy link

We have an internationalized application. Users can change languages with a simple drawer and the UI including the data will update without page reloads.

Angular translations and editor.js internationalization obviously isn't the same and editor.js instances won't be re-initialized. So they still contain the messages from the previous language. Because of that, I'm looking for a way to change the messages of an already running editor.js instance.
We tried to save the current editor's state and re-initialize editor.js but couldn't get it working reliably. This is why it would be great to have something like editorInstance.setMessages(...).

I couldn't find anything similar in the github issues, maybe also just failed to search properly. Is this complex to implement or any other workarounds available?

@neSpecc
Copy link
Member

neSpecc commented Nov 11, 2024

Why not just re-init editorjs? Updating messages will require re-rendering of the UI

@sandrooco
Copy link
Author

sandrooco commented Nov 11, 2024

Thanks for your quick feedback!
Because there might be changes in the editor already, so we would have to first extract the data and re-initialize (which we tried but found no working and quick solution).
Setting the messages and re-rendering sounds quite feasible to me.

@codex-team codex-team locked and limited conversation to collaborators Nov 24, 2024
@idebenone idebenone converted this issue into discussion #2876 Nov 24, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants