# Locale and Formatting Tools Locale-aware number, currency, date, plural, relative-time, list and sort formatting from the ICU/CLDR data built into the server. ## How to pay Machine-payable over x402. USDC on: Base (eip155:8453), Solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp), Polygon (eip155:137), Arbitrum One (eip155:42161). No accounts. No API keys. No signup. The paying wallet is the account. ## Machine-readable - OpenAPI: https://locale-tools.x402tookit.com/openapi.json - x402 manifest: https://locale-tools.x402tookit.com/.well-known/x402 - Catalog (free): https://locale-tools.x402tookit.com/catalog - Health (free): https://locale-tools.x402tookit.com/health - Uptime (free): https://locale-tools.x402tookit.com/uptime ## Endpoints (8) ### GET /format-currency — $0.02 Format an amount as money for an ISO 4217 currency code in a locale; reports minor-unit digits; unknown codes rejected. Params: amount: number, currency: string, locale?: string, display?: string Example: https://locale-tools.x402tookit.com/format-currency?amount=1234.5¤cy=EUR&locale=de-DE ### GET /format-date — $0.02 Show an instant in an IANA timezone and locale with full/long/medium/short styles; DST-aware, with UTC offset. Params: date: string, timeZone?: string, locale?: string, dateStyle?: string, timeStyle?: string Example: https://locale-tools.x402tookit.com/format-date?date=2024-01-15T12%3A00%3A00Z&timeZone=America%2FNew_York&locale=en-US&dateStyle=full&timeStyle=short ### GET /format-number — $0.02 Format a number as decimal, percent, compact (1.2K) or unit text in any BCP47 locale, with digit control. Params: value: number, locale?: string, style?: string, unit?: string, unitDisplay?: string, compactDisplay?: string, maxFractionDigits?: integer, minFractionDigits?: integer Example: https://locale-tools.x402tookit.com/format-number?value=1234567.891&locale=de-DE ### GET /list-format — $0.02 Join items into a natural-language and/or list for a locale ('a, b, and c' in en, 'a, b y c' in es). Params: items: string, locale?: string, type?: string, style?: string Example: https://locale-tools.x402tookit.com/list-format?items=apples%7Cpears%7Cplums&locale=en-GB&type=conjunction ### GET /locale-parse — $0.02 Parse and canonicalize a BCP47 language tag: language, script, region, extensions, likely subtags, direction. Params: tag: string Example: https://locale-tools.x402tookit.com/locale-parse?tag=zh-TW ### GET /plural-category — $0.02 CLDR plural category (zero/one/two/few/many/other) of a number in a locale, cardinal and ordinal, with all categories. Params: n: number, locale: string Example: https://locale-tools.x402tookit.com/plural-category?n=2&locale=cy ### GET /relative-time — $0.02 Relative time text such as '3 days ago' or 'tomorrow' for a signed value and unit in any locale. Params: value: number, unit: string, locale?: string, numeric?: string, style?: string Example: https://locale-tools.x402tookit.com/relative-time?value=-3&unit=day&locale=es ### GET /sort-text — $0.02 Sort up to 200 strings by locale rules (German a-umlaut, Swedish a-ring, Spanish n-tilde) with numeric option. Params: items: string, locale?: string, numeric?: boolean, sensitivity?: string, caseFirst?: string, order?: string Example: https://locale-tools.x402tookit.com/sort-text?items=Zebra%7C%C3%85sa%7CAnna%7C%C3%96rjan&locale=sv ## Terms Output comes from the ICU/CLDR data built into the server's Node.js runtime and can differ between ICU versions and from other platforms. Formatting only; not translation, legal or accounting advice.