Description
Most appropriate sub-area of p5.js?
- Friendly Errors
- Internationalization
Feature enhancement details:
Internationalization was introduced to the FES in #4233. So far we only have English strings for the FES and even that file is starting to get pretty big, and could grow even bigger if more functionality is added or when translations are added for all of these and these messages.
In the future, when we have translations for more and more languages, all of this may take up a lot of space within the library.
As @outofambit and @limzykenneth discussed in #4233, we can host the translation files on a CDN and then fetch whichever file is needed depending on the language detected by i18next-browser-languageDetector
. The English translation will serve as a fallback in case something goes wrong while fetching from the CDN. Another option could be to package translations into the zip, with instructions on how to load one.
I am more inclined towards the first option as it does not require extra work and understanding on the user's part. Maybe we can implement the second option too, to have translated messages when running offline.
Translations could be updated with new releases of p5.
I can work on updating the internationalization code, the build process, the release process to implement this.
We should also have another issue to let new contributors know that we are looking for help in adding translations for all languages. 😄