Skip to content

Introduce new number formatting for Switzerland#27268

Merged
bramkragten merged 1 commit intohome-assistant:devfrom
michaelherger:27254-support-de-CH-number-formatting
Oct 1, 2025
Merged

Introduce new number formatting for Switzerland#27268
bramkragten merged 1 commit intohome-assistant:devfrom
michaelherger:27254-support-de-CH-number-formatting

Conversation

@michaelherger
Copy link
Contributor

Proposed change

In the German speaking part of Switzerland we use single quotes to group thousands, and the period as the decimal separator: 1'234.56 vs. 1.234,56 in Germany. See eg. https://www.localeplanet.com/icu/de-CH/index.html.

Using the German language would give us confusing commas as the decimal separator etc. As long as there is no German (Switzerland) de-CH locale we can live with a formatting override.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

…ormatting for Switzerland

...and likely other locale. In the German speaking part of Switzerland we use single quotes to group thousands, and the period as the decimal separator: 1'234.56 vs. 1.234,56 in Germany. See eg. https://www.localeplanet.com/icu/de-CH/index.html.

Using the German language would give us confusing commas as the decimal separator etc. As long as there is no German (Switzerland) `de-CH` locale we can live with a formatting override.
Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

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

Hi @michaelherger

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant home-assistant bot marked this pull request as draft September 30, 2025 15:58
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@piitaya piitaya changed the title Fix #27254, #20342 Introduce new number formatting for Switzerland Introduce new number formatting for Switzerland Sep 30, 2025
@michaelherger michaelherger marked this pull request as ready for review September 30, 2025 16:45
@bramkragten bramkragten merged commit 6efca93 into home-assistant:dev Oct 1, 2025
18 checks passed
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.

Numbers (decimal separator etc.) are not localized

2 participants