Localization without using "import"
Current locale files are optimized only for importing them via import but you always build them on your own
Read full answer below ↓Question
Hi, to do localization is there a way to do it without using "import" ie with <script src="myFolder/grapesjs/locale/it.js"></script>?
From the docs:
import grapesjs from 'grapesjs'; import it from 'grapesjs/locale/it'; import tr from 'grapesjs/locale/tr'; const editor = grapesjs.init({ ... i18n: { // locale: 'en', // default locale // detectLocale: true, // by default, the editor will detect the language // localeFallback: 'en', // default fallback messages: { it, tr }, } });
Answers (3)
Current locale files are optimized only for importing them via import but you always build them on your own
And how? Is anywhere documentation how to setup locale in vanilla js?
Same problem here, how we can set the locale in JavaScript vanilla?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4920
Missed localization keys for de locale
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Not browser related Reproducible demo link...
Issue #5354
canvas.script entries do not respect an "import map"
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Version 1.56.20 Chromium: 115.0.5790.171 (Of...
Issue #3565
undefined for multiple page manager in React
Hi, please what is the best way to implement multiple page manager in a react app. I have successfully implemented this without page manage...
Issue #2721
[Bug] Can not import any locale file from grapesjs/locale/
Hi I run into an error when I'm trying to import any locale file from 'grapejs/locale' by using es6 import I followed by the documentation:...
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 →Related tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.