Going slightly further, as a minor refinement REST resources could provision for all backend supported locales, so typically we’d get something like this:
In locale ‘en’:
{
"uuid": ...,
"name": "Outpatient Visit",
"label_en": "OPD Visit",
"label_fr": "Visite ambulatoire",
...
}
In locale ‘fr’:
{
"uuid": ...,
"name": "Outpatient Visit",
"label_en": "OPD Visit",
"label_fr": "Visite ambulatoire",
...
}
And the frontend code would attempt to find a label in accordance to the user’s session locale, or default to the metadata name. On the frontend this would allow to switch between supported locales while minimizing server calls.