Skip to content

feat: add Lao (lo-LA) locale - #2444

Merged
mastermunj merged 1 commit into
mastermunj:mainfrom
xubmuajkub:feat/2443-lo-LA-locale
Aug 30, 2026
Merged

feat: add Lao (lo-LA) locale#2444
mastermunj merged 1 commit into
mastermunj:mainfrom
xubmuajkub:feat/2443-lo-LA-locale

Conversation

@xubmuajkub

Copy link
Copy Markdown

Closes #2443

Adds cardinal, currency and ordinal support for Lao.

Why this is not a copy of th-TH

Lao shares script ancestry and scale vocabulary with Thai, but three things differ:

Lao Thai
20 ຊາວ ຍີ່ສິບ
trailing 1 after a ten ເອັດ — ສິບເອັດ, ຊາວເອັດ, ເກົ້າສິບເອັດ ສິບເອັດ only
10,000 ສິບພັນ (written/finance) ໝື່ນ

The ເອັດ forms are carried by exactWordsMapping. convertInternal consults it for chunk remainders as well as whole numbers, so 121 resolves to ໜຶ່ງຮ້ອຍຊາວເອັດ without needing an entry per hundred.

Scale

100,000 has a named scale word (ແສນ), but 10,000 does not get one: written Lao finance reads it as ສິບພັນ rather than the spoken ໝື່ນ. Leaving 10^4 unnamed lets the composer build it from ພັນ.

10000     => ສິບພັນ
20000     => ຊາວພັນ
100000    => ໜຶ່ງແສນ
792581    => ເຈັດແສນເກົ້າສິບສອງພັນຫ້າຮ້ອຍແປດສິບເອັດ
2741034   => ສອງລ້ານເຈັດແສນສີ່ສິບເອັດພັນສາມສິບສີ່

Ordinals

Lao forms ordinals with the prefix ທີ, so this uses ordinalPrefix rather than a per-number ordinalWordsMapping, matching km-KH. toOrdinal(21) → ທີຊາວເອັດ.

Currency

The kip subunit (ອັດ / att) is defunct and not used in practice, so fractional amounts are read as a decimal instead of being given a subunit name:

1234.56 => ໜຶ່ງພັນສອງຮ້ອຍສາມສິບສີ່ກີບຈຸດຫ້າສິບຫົກຖ້ວນ
500     => ຫ້າຮ້ອຍກີບຖ້ວນ

One thing I would like a maintainer's opinion on. texts.and supplies that leading ຈຸດ, because the currency converter emits texts.and before the fractional words while a fractionalUnit name would follow them. The side effect is that convert(n, { useAnd: true }) now inserts ຈຸດ between a unit word and its remainder. Lao uses no conjunction inside numbers, so useAnd is not meaningful for this locale either way — but if you would rather not overload texts.and, I am happy to drop the ຈຸດ and emit the bare digits instead, or to rework it against a small core change.

Bundle size budget

The new locale pushes the full UMD build to 70.79 KB gzip, just past the existing 70.50 KiB ceiling, so SIZE_BUDGETS.fullGzipped is raised to 71 KiB. Per-locale budgets are untouched.

Verification

All steps from CONTRIBUTING pass, plus docs:check:

npm run lint            ✓
npm run test:locale-quality  ✓
npm test -- --run       ✓  42743 tests, 100% statements/branches/functions/lines
npm run build           ✓
npm run test:runtime    ✓
npm run test:package    ✓
npm run docs:check      ✓

npm run format reports one pre-existing issue in CHANGELOG.md that is also present on a clean main; left untouched.

Also updated

  • SUPPORTED_LOCALES count 135 → 136 in the manifest test, runtime smoke check, README and docs
  • locale-specific numbering-system count 4 → 5
  • Reviewed language identity for the lo subtag
  • README locale table, docs/locales/lao.md, locales index, VitePress sidebar, NumberDemo.vue

🤖 Generated with Claude Code

Adds cardinal, currency and ordinal support for Lao.

Lao is not Thai with different glyphs, so lo-LA is not a copy of th-TH:

- 20 is ຊາວ, not a compound of ສອງ and ສິບ.
- A trailing 1 after any ten is ເອັດ (ສິບເອັດ, ຊາວເອັດ, ເກົ້າສິບເອັດ).
  These are carried by exactWordsMapping, which the converter also consults
  for chunk remainders, so 121 resolves to ໜຶ່ງຮ້ອຍຊາວເອັດ.
- 100,000 has a named scale word (ແສນ) but 10,000 does not: written Lao
  finance reads it as ສິບພັນ rather than the spoken ໝື່ນ, so 10^4 is left
  unnamed and composed from ພັນ.

Ordinals use the prefix ທີ, so ordinalPrefix is used rather than a
per-number ordinal mapping, matching the approach taken by km-KH.

The kip subunit (ອັດ / att) is defunct, so fractional currency amounts are
read as a decimal instead of being given a subunit name. texts.and supplies
the leading ຈຸດ, because the currency converter emits it before the
fractional words while a fractionalUnit name would follow them. One
consequence worth noting: convert(n, { useAnd: true }) now inserts ຈຸດ
between a unit word and its remainder. Lao uses no conjunction in numbers,
so useAnd is not meaningful for this locale either way.

Also bumps the full UMD gzip budget from 70.5 KiB to 71 KiB, which the new
locale pushes past, and updates the locale counts in docs and smoke checks.

Closes mastermunj#2443

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@xubmuajkub
xubmuajkub requested a review from mastermunj as a code owner August 29, 2026 19:28
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (1e9a604) to head (5279b3f).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2444   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          144       145    +1     
  Lines         2281      2291   +10     
  Branches       352       349    -3     
=========================================
+ Hits          2281      2291   +10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mastermunj
mastermunj merged commit 7ec273f into mastermunj:main Aug 30, 2026
5 checks passed
@mastermunj

Copy link
Copy Markdown
Owner

Thank you for your contribution @xubmuajkub. Release v7.1.0

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.

feat: add Lao (lo-LA) locale

3 participants