-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Move languages to package and load locally #1068
Comments
I've done some digging and found the reference, but don't know how to override it. In config.js, the location is se: export const defaultI18n = {
location: 'https://formbuilder.online/assets/lang/',
} I'm no javascript expert, so I couldn't figure out how to set this in the options, but even if I could, it appears the language files are not included in the installation or even the source of the package. @kevinchappell , where are these languages files, and can they be included in the package so that using formBuilder doesn't require a network connection? Thanks. |
i18n config can be set via plugin options: https://formbuilder.online/docs/formBuilder/options/i18n/
only the English is included to keep the package light. There are 28 languages but the most commonly used language is English. Including the other languages would add an additional 102.6kb to the package. If it takes 5.8 seconds to load a 3.8kb language file, the additional languages would add over 2 to your load time.
The language files were moved to their own repo so they could be developed and published independently of formBuilder. They can be found in the following locations.
English is hardcoded into the plugin and should work without internet: The plugin still makes a request for the default language (English unless changed) incase the developer has set the |
devServer should use local language files for development sans internet. resolves #1068
devServer should use local language files for development sans internet. resolves #1068
## [3.4.3](v3.4.2...v3.4.3) (2020-08-22) ### Bug Fixes * copy language files from module ([0fee6c3](0fee6c3)), closes [#1068](#1068)
🎉 This issue has been resolved in version 3.4.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description:
During rendering, the formbuilder loads language files from the network, rather than locally. As you can see, this add almost 6 seconds to my page rendering:
Can these files be moved into the package, so they can be loaded locally? Or configured, so they could be on a cdn or whatever.
Environment Details:
Expected Behavior
No outside network activity
The text was updated successfully, but these errors were encountered: