Start here
Playground
Five messages in 13 languages, compiled by loclizr for this site and running in your browser.
This site compiles its own catalogs with loclizr build. The widgets below call the generated functions
in your browser, with no ICU parser and no request to a server.
Switch the language
Section titled “Switch the language”Hello, Ada!
3 items in your cart
Total: €73.50
On its way
Updated Oct 3, 2026
m.demo_items({ count: 3 }, { locale: 'en' })Every line is one generated function called with the chosen locale, as the line under the output shows.
The page itself stays English, so the demo passes { locale } per call instead of calling setLocale.
Every language at once
Section titled “Every language at once”| English (en) | 3 items in your cart | Total: €73.50 |
|---|---|---|
| Deutsch (de) | 3 Artikel im Warenkorb | Summe: 73,50 € |
| Français (fr) | 3 articles dans votre panier | Total : 73,50 € |
| Español (es) | 3 artículos en tu carrito | Total: 73,50 € |
| Português (pt) | 3 itens no seu carrinho | Total: € 73,50 |
| Italiano (it) | 3 articoli nel carrello | Totale: 73,50 € |
| Polski (pl) | 3 produkty w koszyku | Razem: 73,50 € |
| Українська (uk) | 3 товари в кошику | Разом: 73,50 EUR |
| العربية (ar) | 3 منتجات في سلتك | المجموع: 73.50 € |
| हिन्दी (hi) | आपकी कार्ट में 3 आइटम हैं | कुल: €73.50 |
| 日本語 (ja) | カートに3点の商品があります | 合計: €73.50 |
| 中文 (zh) | 购物车中有 3 件商品 | 合计:€73.50 |
| 한국어 (ko) | 장바구니에 상품 3개가 있습니다 | 합계: €73.50 |
Try 1, 2, 5, 22 and 1000000. Polish and Ukrainian switch between one, few and many, Arabic has
six forms, and Japanese, Chinese and Korean have one. 0 hits the exact =0 branch in every language.
The catalogs behind it
Section titled “The catalogs behind it”import { defineConfig } from 'loclizr'
export default defineConfig({ locales: ['en', 'de', 'fr', 'es', 'pt', 'it', 'pl', 'uk', 'ar', 'hi', 'ja', 'zh', 'ko'], sourceLocale: 'en',}){ "demo": { "greeting": "Hello, {name}!", "items": "{count, plural, =0 {Your cart is empty} one {# item in your cart} other {# items in your cart}}", "total": "Total: {amount, number, ::currency/EUR}", "updated": "Updated {at, date, medium}", "status": "{state, select, packing {Being packed} shipped {On its way} delivered {Delivered} other {Processing}}" }}{ "demo": { "greeting": "Cześć, {name}!", "items": "{count, plural, =0 {Twój koszyk jest pusty} one {# produkt w koszyku} few {# produkty w koszyku} many {# produktów w koszyku} other {# produktu w koszyku}}", "total": "Razem: {amount, number, ::currency/EUR}", "updated": "Zaktualizowano {at, date, medium}", "status": "{state, select, packing {Pakowanie} shipped {W drodze} delivered {Dostarczono} other {W realizacji}}" }}{ "demo": { "greeting": "مرحبًا، {name}!", "items": "{count, plural, =0 {سلتك فارغة} zero {لا توجد منتجات في سلتك} one {منتج واحد في سلتك} two {منتجان في سلتك} few {# منتجات في سلتك} many {# منتجًا في سلتك} other {# منتج في سلتك}}", "total": "المجموع: {amount, number, ::currency/EUR}", "updated": "آخر تحديث: {at, date, medium}", "status": "{state, select, packing {قيد التغليف} shipped {في الطريق} delivered {تم التوصيل} other {قيد المعالجة}}" }}Every translation lists exactly the plural categories Intl.PluralRules reports for its language.
Drop few from the Polish plural and the build says so:
warn LZ3007 plural-category-incomplete locales/pl.json:4:15 pl demo.items
pl selects few for some values of {count}, and this plural has no branch for it.
fix add few {...} to {count, plural, ...} in locales/pl.jsonSee Catalogs for the message syntax and Language switching
for setLocale in an app.