-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FES i18n: Loading translation files from CDN #4694
Labels
Comments
The CDN option seems good to me. We can package the English version into the library itself so something is always available offline. In the future it would be nice if the website itself can package the appropriate langauge version into the library download depending on which language the user is viewing the website in, but that's much more advanced. |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Most appropriate sub-area of p5.js?
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. 😄
The text was updated successfully, but these errors were encountered: