You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 19, 2024. It is now read-only.
Add currentLanguage property field to default state and set it to null
Add reducer and actions to handle store update and dispatch
Set currentLanguage on selecting a language on the switcher.
{"label": "ជនជាតិខ្មែរ", "param": "khmer"}
Dispatch payload to store
Once currentLanguage param value is set, use it to override the label here.
Additional detail on how this will work
Load the current labels as the default language as provided here
Provide translations config on the site config. This will be an array of objects responsible for driving the language switcher. The object will have the following properties
* label - text rendered on the switcher
* param - language literal responsible for rendering specific language label on the layer config
Provide a language label for the languages as shown below.
"label": "Nombre de prestataires de soins alternatifs formels basés dans la
famille dans le pays (familles d'accueil et soignants formels)"
"label-khmer": "ចំនួនអ្នកផ្ត ល់សេវាថែ ទាំតាមគ្រួ សារផ្លូវកា រនៅក្នុងប្ រទេសចិញ្ចឹម អ្នកថែ ទាំនិង (អ្នក ថែទាំសាច់ញា តិផ្លូវការ)"
NB* The language label on the layer specification should match the param added on the site config