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
Currently, UI components such as buttons, labels, and other text elements (e.g., the PrimeVue Calendar component) do not adapt to the user’s browser language. To improve internationalization (i18n), these components should display text in the language corresponding to the browser’s locale (e.g., navigator.language). This will enhance the user experience by providing a localized interface without requiring manual language selection.
User Story
As a user,
I want all UI elements on the screen (e.g., buttons, labels, calendar labels) to automatically display in my native language based on my browser’s locale,
So that I can interact with the application in a familiar and comfortable way without needing to manually set my language preference.
Considerations
How should UI language interact with form language (see forum thread about Enketo behavior)
We can take some of these translations to keep the bundle light.
Ideally only the required language is requested
Not all components are PrimeVue, and they still need translations (Geopoint). Search by TODO: translations to find places where translations are needed.
The browser’s locale is determined using navigator.language (e.g., "en-US" → "en").
Implementation: Add logic to detect the browser’s language using navigator.language and map it to supported locales. Ensure buttons, labels, and other UI elements use the detected locale’s translations.
Documentation: Update the project’s README or developer guide with instructions on adding new languages.
Description
Currently, UI components such as buttons, labels, and other text elements (e.g., the PrimeVue
Calendarcomponent) do not adapt to the user’s browser language. To improve internationalization (i18n), these components should display text in the language corresponding to the browser’s locale (e.g.,navigator.language). This will enhance the user experience by providing a localized interface without requiring manual language selection.User Story
As a user,
I want all UI elements on the screen (e.g., buttons, labels, calendar labels) to automatically display in my native language based on my browser’s locale,
So that I can interact with the application in a familiar and comfortable way without needing to manually set my language preference.
Considerations
TODO: translationsto find places where translations are needed.navigator.language(e.g., "en-US" → "en").<select>and<select1>value types, partial support for<range>#273 (comment)Tasks
navigator.languageand map it to supported locales. Ensure buttons, labels, and other UI elements use the detected locale’s translations.Related