-
Notifications
You must be signed in to change notification settings - Fork 0
Concept
Benoit edited this page Feb 28, 2024
·
3 revisions
-
Pre-load and Store Locally: Language packs should be pre-loaded and stored using client-side storage solution like
localStorage
. This ensures that language resources are available offline. -
Library Support: Utilize libraries such as
i18next
for supporting offline language switching by storing translations in the browser.
-
Store User Preferences Locally: Use
localStorage
to remember the user's language preference. This allows the application to load with the user's preferred language automatically, even when offline.
-
Upon application load, verify if a stored language preference exists. If so, initialize the application with the specified language pack.
-
Update both the application state and local storage with the new language preference whenever the user changes the language.
To test the website Mockoon will be used