Issue #2718💬 AnsweredOpened April 17, 2020by Lerdouille0 reactions

Can't use i18n

Quick answerby pouyamiralayi

@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)

pouyamiralayiApril 18, 2020

@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!

artfApril 20, 2020

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...

LerdouilleApril 20, 2020

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.

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.