Skip to content

Fix ApplicationLanguages.PrimaryLanguageOverride to allow clearing with empty string#26

Open
qiutongMS wants to merge 1 commit intomainfrom
user/qiutongshen/fixIssue17
Open

Fix ApplicationLanguages.PrimaryLanguageOverride to allow clearing with empty string#26
qiutongMS wants to merge 1 commit intomainfrom
user/qiutongshen/fixIssue17

Conversation

@qiutongMS
Copy link
Collaborator

@qiutongMS qiutongMS commented Sep 22, 2025

Summary Fixes issue #17

where ApplicationLanguages.PrimaryLanguageOverride cannot be unset once it has been set.

Problem

The PrimaryLanguageOverride property validation logic was too strict - it required all input to be a well-formed language tag, including empty strings. This prevented users from clearing the language override by setting an empty string.

Solution

Modified the validation logic in ApplicationLanguages.cpp to:

…g to clear override

- Modified validation logic in ApplicationLanguages.cpp to allow empty strings
- Empty string input now clears the language override instead of throwing exception
- Non-empty strings still validated using IsWellFormedTag()

Fixes #17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant