Localization without using "import"
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
BUG: 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 #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:...
Issue #2763
GrapesJs and PHP - store and load data to show in editor and as HTML page as well
I am using GrapesJS to build a simple webpage. I included the script in the following way inside head part : I am using GrapesJS to build a...
Issue #1262
Editable Cell
Hello, I am using GrapesJS for newsletters (with the gjs-preset-newsletter plugin) and i have a problem when I import code. I can't edit th...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.