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

feat(framework): add default values for language/theme #6738

Merged
merged 2 commits into from
Mar 20, 2023
Merged

Conversation

nnaydenow
Copy link
Contributor

@nnaydenow nnaydenow commented Mar 20, 2023

Currently, users are not able to set language and theme to their default values because there is no mechanics for that.

With this PR we are introducing new getDefaultLanguage / getDefaultTheme method which returns the default value for language / theme.

To reset your language to the default value:

import { setLanguage, getDefaultLanguage } from "@ui5/webcomponents-base/dist/config/Language.js";
setLanguage(getDefaultLanguage());

To reset your theme to the default value:

import { setTheme, getDefaultTheme } from "@ui5/webcomponents-base/dist/config/Theme.js";
setTheme(getDefaultTheme());

Fixes: #6712

@nnaydenow nnaydenow merged commit 36d3636 into main Mar 20, 2023
@nnaydenow nnaydenow deleted the default-values branch March 30, 2023 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Localization: setLanguage(null) throws TS error
3 participants