Skip to content

Concept

Benoit edited this page Feb 28, 2024 · 3 revisions

Handling Offline Capabilities

Offline Language Changes

Local Storage of Language Packs

  • 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.

Language Selection Persistence

  • 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.

Implementation Strategy

  • 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.

Mocking

To test the website Mockoon will be used