Can't use i18n
@Lerdouille your issue is not related to grapesjs, you have to reference your locale objects somehow which i suggest using global variables for them, and to import them, is basically a matter of including their related scripts inside your html. Cheers!
Read full answer below ↓Question
Hi again @artf , you close my previous ticket but i don't succeed to reopen it i saw the documentation and the part reguarding i18n but i didn't succed to use it. In your documentation, you use some import function, basically my code is pretty simpler and without import, like this : <html> <body> <link rel="stylesheet" href="grapesjs/css/grapes.min.css"> <script src="grapesjs/grapes.js"></script> <div id="gjs"> <h1>Hello World Component!</h1> </div> <script type="text/javascript"> var...
Answers (3)
@Lerdouille your issue is not related to grapesjs, you have to reference your locale objects somehow which i suggest using global variables for them, and to import them, is basically a matter of including their related scripts inside your html. Cheers!
Current code of locale files are optimized only for importing them via import, if you want to improve that PR are welcomeyou close my previous ticket but i don't succeed to reopen it There is no need to keep questions open if there is a need to reply I'll do it, so please, next time avoid opening o...
Thank you for your answers. I do succeed to display the good translation by tweaking the grapes.js. To do that, i had to copy/paste the part **/ "./src/i18n/locale/en.js": /!******************************!\ ! ./src/i18n/locale/en.js ! \******************************/ /! exports provided: default /...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2029
[Question/Bug] grapesjs throws a DOMException if you import HTML contents with invalid (numbered) attributes
Hi @artf , We got a report that when you import some HTML code with incorrect attributes, such as <td class="cell" 01234="0" >Hello world!...
Issue #1163
[Question] How do I set <body> attributes
Hi @artf, On the previous issue #1132 about export <body my="attributes"> code, I think it's done using exportWrapper: true. But now experi...
Issue #3316
The editor does not remove the dead script blocks
Version: 0.16.34 Are you able to reproduce the bug from the demo? [ ] Yes [x ] No As I understand the code import dialog skips all the HTML...
Issue #3268
How to add javascript in the html without sanitization?
Hey @artf, I am taking javascript input from the user. I need to add this javascript inside the template HTML but it gets sanitized. Is the...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.