locale-format-validator
БесплатноБез исполняемых скриптовНе проверенUse when a product shows dates, numbers, currencies, times or durations to users in several locales and needs proof each locale formats them correctly…
от testland★ 18 звёзд на GitHubОб этом скилле
locale-format-validator
Overview
Locale-specific formatting is a common bug source:
- US user sees
5/4/2026and reads "May 4." Spanish user sees the same string and reads "April 5." - German user sees
1,234.56and may interpret as 1.23456 (the comma is a thousands separator, the period a decimal in DE). - Japanese user sees a price in dollars instead of yen.
This skill verifies the app uses the right format per locale.
When to use
- The product displays dates, numbers, currencies, or times.
- A bug report says "the date is in the wrong format."
- Pre-release: scheduled locale-format check.
How to use
- Identify the formatting library the app uses (Step 1); prefer Intl APIs that delegate to CLDR.
- Fix the expected date, number, and currency strings per target locale from CLDR (Steps 2-4, Step 8).
- Author tests asserting the rendered date / number / currency per locale (Step 5).
- Add timezone assertions so timestamps render in the user's timezone (Step 6).
- Run the tests across the full locale matrix in CI (Step 7).
- Trace any failure back to CLDR conventions, not hand-coded assumptions.
Step 1 - Identify the formatting library
| Stack | Library |
|---|---|
| JS / browser | Intl.DateTimeFormat / Intl.NumberFormat (built-in) |
| React | react-intl (FormatJS) <FormattedDate> |
| Python | babel.dates / babel.numbers |
| Java | DateTimeFormatter / NumberFormat with Locale |
| Ruby on Rails | I18n.l(date, format: :long) / number_to_currency |
| .NET | CultureInfo + ToString("d", culture) |
The Intl APIs (browser-native) are recommended - they delegate to the underlying ICU library for canonical CLDR-based formatting.
Step 2 - Date format expectations per locale
| Locale | Short date | Medium | Long |
|---|---|---|---|
| en-US | 5/4/2026 | May 4, 2026 | May 4, 2026 |
| en-GB | 04/05/2026 | 4 May 2026 | 4 May 2026 |
| de-DE | 04.05.2026 | 04.05.2026 | 4. Mai 2026 |
| fr-FR | 04/05/2026 | 4 mai 2026 | 4 mai 2026 |
| ja-JP | 2026/05/04 | 2026/05/04 | 2026年5月4日 |
| zh-CN | 2026/5/4 | 2026年5月4日 | 2026年5月4日 |
US and DE date formats look superficially similar (differ only in separator) but are unambiguously interpreted only in their locale.
Step 3 - Number format expectations
| Locale | 1234.56 | 1234567 |
|---|---|---|
| en-US | 1,234.56 | 1,234,567 |
| en-GB | 1,234.56 | 1,234,567 |
| de-DE | 1.234,56 | 1.234.567 |
| fr-FR | 1 234,56 | 1 234 567 |
| ar-SA | ١٬٢٣٤٫٥٦ | ١٬٢٣٤٬٥٦٧ |
| hi-IN | 1,234.56 | 12,34,567 |
The Indian grouping (lakh = 100,000 displayed as 1,00,000) is a
common bug source for apps using only Western thousands grouping.
Step 4 - Currency expectations
| Locale | $1234.56 USD | €1234.56 EUR | ¥1234 JPY |
|---|---|---|---|
| en-US | $1,234.56 | €1,234.56 | ¥1,234 |
| de-DE | 1.234,56 $ | 1.234,56 € | 1.234 ¥ |
| fr-FR | 1 234,56 $ | 1 234,56 € | 1 234 ¥ |
| ja-JP | $1,234.56 | €1,234.56 | ¥1,234 |
Notes:
- Euro symbol position varies (€-DE vs DE-€ in some renderings).
- JPY has no decimals.
- Currency symbol may precede or follow per locale.
Step 5 - Author tests
import { test, expect } from '@playwright/test';
test('date format per locale', async ({ page }) => {
// en-US
await page.goto('/orders/123?lng=en-US');
await expect(page.getByTestId('order-date')).toHaveText('5/4/2026');
// de-DE
await page.goto('/orders/123?lng=de-DE');
await expect(page.getByTestId('order-date')).toHaveText('04.05.2026');
// ja-JP
await page.goto('/orders/123?lng=ja-JP');
await expect(page.getByTestId('order-date')).toHaveText('2026/05/04');
});
test('currency format per locale', async ({ page }) => {
await page.goto('/orders/123?lng=de-DE');
await expect(page.getByTestId('order-total')).toHaveText('1.234,56 €');
await page.goto('/orders/123?lng=ja-JP¤cy=JPY');
await expect(page.getByTestId('order-total')).toHaveText('¥1,235'); // no decimals
});
test('number format per locale', async ({ page }) => {
await page.goto('/dashboard?lng=hi-IN&users=1234567');
await expect(page.getByTestId('user-count')).toHaveText('12,34,567'); // Indian grouping
});
Step 6 - Time + timezone
A separate concern: timestamps must
Установить locale-format-validator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл locale-format-validator?
Use when a product shows dates, numbers, currencies, times or durations to users in several locales and needs proof each locale formats them correctly (5/4/2026 vs 04.05.2026, 1,234.56 vs 1.234,56, $ vs EUR placement).
Как установить скилл locale-format-validator?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл locale-format-validator запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic