Language Choice¶
The language choice pattern allows a user to select their language choice of preference. The language choice is only sticky for the duration of the session. If language choice preference is to be maintained across sessions it needs to be stored somewhere more permanent than a temporary session store.
Code¶
The state that implements the language choice is called the LanguageChoice and is documented at the Go JSBox documentation.
Implementations¶
- Switchboard uses the LanguageChoice to allow the user to select a language of preference for the duration of a USSD session.
Notes¶
- Vumi Go’s
i18n
machinery works in tandem with the InteractionMachine‘s utilities for fetching of translations for the selected language.