GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.36k stars 4.05k forks source link

Localization without using "import" #3022

Closed trony2020 closed 4 years ago

trony2020 commented 4 years ago

Hi, to do localization is there a way to do it without using "import" ie with ?

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 }, } });

artf commented 4 years ago

Current locale files are optimized only for importing them via import but you always build them on your own

applibs commented 1 year ago

And how? Is anywhere documentation how to setup locale in vanilla js?

Ahriman commented 7 months ago

Same problem here, how we can set the locale in JavaScript vanilla?