Skip to content

Conversation

@free-open-name
Copy link

  • add better Chinese translation
  • add quick language switch on Nav Bar ( only affect site language, which only affect the core CMP popup demo ) to quickly test translations from the core demo which has more text.
  • also add some minimal CSS to support it.

Quick preview as follow:
image

student added 3 commits July 31, 2025 07:59
* add quick language switch on Nav Bar ( only affect site language, which only affect the core CMP popup demo ) to quickly test translations from the core demo which has more text.
* also add some minimal CSS to support it.
… supported (i18n translated) language variant and failback to 2 characters language code if not supported.

e.g. if the top html tag is

    <html lang="EN-CA">

it will first test if "en-ca" is translated , then check if "en" is supported, and correct i18n translation will be used.
this behavior consistent with klaro.show() command.

change <html lang="XX-XX"> then call klaro.show()  was working, but auto detection was not. so this fix sync the behavior
* about hu.yml translation
it cause error

    YAMLParseError: Nested mappings are not allowed in compact mappings at line 54, column 26:

    descriptionEmptyStore: Amennyiben beleegyezik ebbe a szolgáltatásba, el kell …

just wrapped with single quote to skip the error as I did not understand that language
@free-open-name
Copy link
Author

another functional changes

Ensure correctly detect language variant at first load, and only load supported (i18n translated) language variant and failback to 2 characters language code if not supported.

e.g. if the top html tag is

<html lang="EN-CA">

it will first test if "en-ca" is translated , then check if "en" is supported, and correct i18n translation will be used.
this behavior consistent with klaro.show() command.

change then call klaro.show() was working, but auto detection was not. so this fix sync the behavior

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