Skip to content

Advanced locale handling - #86

Merged
borgar merged 4 commits into
masterfrom
built-in-ids
Oct 4, 2026
Merged

borgar merged 4 commits into
masterfrom
built-in-ids

Conversation

@borgar

@borgar borgar commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Adds delocalize(pattern, fromLocale) => pattern

Format patterns in Excel can be localized. So something that reads [red]#,##0.00 in an en-US locale, will be exposed as [rot]#.##0,00 in a de-DE locale. We now support converting format patterns from a locale to the default/canonical en-US variant. There a some differences in the locale data between MacOS and Windows but both should work fine.

Closes #23.

Adds getFormatFromId(fmtId, l10n) => pattern

Excel has a number of built in ID for number formats. These will change depending on locale (they are lconstructed based on locale format settings). We now support converting an Excel format ID to the corresponding format pattern in a supported locale. Again, the returned values for these vary between Excel on MacOS vs Windows. The Windows output has been emulated in all cases.

@borgar borgar changed the title Built in ids Advanced locale handling Oct 4, 2026
@borgar
borgar merged commit a1f59e2 into master Oct 4, 2026
3 checks passed
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.

Locale can flip what the , and . operators mean

1 participant