Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Accept-Language header for locale in ConfigurableServiceResource #2602

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

wborn
Copy link
Member

@wborn wborn commented Dec 10, 2021

Most RESTResources already use the LocaleService to get the locale based on the Accept-Language header and use the system locale only as fallback.
Because the ConfigurableServiceResource does not do this, it results in mixed up languages whenever your browser locale is not the same as the configured system locale.

See:

Most RESTResources already use the LocaleService to get the locale based on the Accept-Language header and use the system locale only as fallback.
Because the ConfigurableServiceResource does not do this, it results in mixed up languages whenever your browser locale is not the same as the configured system locale.

See:

* https://community.openhab.org/t/language-support-question-regional-settings-language-vs-browser-language/128010
* openhab/openhab-webui#1083

Signed-off-by: Wouter Born <[email protected]>
@wborn wborn added the bug An unexpected problem or unintended behavior of the Core label Dec 10, 2021
@wborn wborn requested a review from a team as a code owner December 10, 2021 21:59
@ghys
Copy link
Member

ghys commented Dec 10, 2021

Great to have a solution for this! 👍

Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@kaikreuzer kaikreuzer merged commit 69043be into openhab:main Dec 10, 2021
@kaikreuzer kaikreuzer added this to the 3.2 milestone Dec 10, 2021
@wborn wborn deleted the use-accept-language-header branch December 10, 2021 22:43
@wborn wborn added the i18n/l10n Internationalization/Localization label Dec 11, 2021
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 12, 2023
…penhab#2602)

Most RESTResources already use the LocaleService to get the locale based on the Accept-Language header and use the system locale only as fallback.
Because the ConfigurableServiceResource does not do this, it results in mixed up languages whenever your browser locale is not the same as the configured system locale.

See:

* https://community.openhab.org/t/language-support-question-regional-settings-language-vs-browser-language/128010
* openhab/openhab-webui#1083

Signed-off-by: Wouter Born <[email protected]>
GitOrigin-RevId: 69043be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core i18n/l10n Internationalization/Localization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants