Result:
Jane Doe 123 Main St Springfield, IL 62704 United States
Jane Doe 45 High Street Manchester M1 4WP United Kingdom
Jane Wanjiru P.O. Box 12345-00100 Nairobi 00100 Kenya
Jane Okafor 12 Adeola Odeku St Lagos, Lagos State 101241 Nigeria
Jane Muster Musterstraรe 12 10115 Berlin Germany
Jane Dupont 12 Rue de Paris 75001 Paris France
ใ100-0001 Tokyo, Chiyoda-ku 1-1 Marunouchi Jane Yamada
Beijing, Chaoyang District Jianguomenwai Street 1 Jane Li 100004
Jane Sharma 12 MG Road, Indiranagar Bengaluru, Karnataka 560038 India
Jane Silva Rua Augusta, 123 Consolaรงรฃo Sรฃo Paulo - SP 01305-000 Brazil
ุฌูู ุงูุฏูุณุฑู ุดุงุฑุน ุงูู ูู ููุฏ ุญู ุงูุนููุง ุงูุฑูุงุถ 12211 Saudi Arabia
Jane Smith 12 George St Sydney NSW 2000 Australia
fetch('https://dev.xcojo.com/Locale/?type=currency&value=49.99¤cy=USD&locale=de-DE')
.then(r => r.json())
.then(data => console.log(data.result)); // "49,99 $"
{
"status": "success",
"type": "currency",
"locale": "de-DE",
"currency": "USD",
"input": "49.99",
"result": "49,99 $"
}
https://dev.xcojo.com/Locale/?type=address&locale=JP&format=template
intl, Not a Third-Party APINumber, currency, and date formatting rules are standardized in Unicode's CLDR dataset, and PHP ships a built-in wrapper for it (NumberFormatter, IntlDateFormatter) via ext-intl. That means:
The one requirement: ext-intl must be enabled in PHP. It's on by default on most managed hosts, but check via php -m | grep intl or phpinfo() if formatting requests come back with an error.
Welcome to the Xcojo Locale & Formatting Engine. Where the Language Engine translates words, this engine formats values โ numbers, prices, dates, and address layouts โ the way a given region actually writes them.
type: number, currency, date, or address (required)value: The raw number or date string to format (required for number/currency/date)locale: BCP-47 locale code, e.g. de-DE, en-KE, ja-JP (default: en-US)currency: ISO 4217 currency code, e.g. USD, KES (required for type=currency)style: short, medium, long, or full (for type=date, default: medium)country: ISO 3166-1 alpha-2 code, e.g. JP, KE (for type=address)format: for type=address, template returns field order + example as JSONEnglish (United States) (en-US), English (United Kingdom) (en-GB), English (Kenya) (en-KE), Swahili (Kenya) (sw-KE), German (Germany) (de-DE), French (France) (fr-FR), Spanish (Mexico) (es-MX), Portuguese (Brazil) (pt-BR), Japanese (Japan) (ja-JP), Chinese (China) (zh-CN), Hindi (India) (hi-IN), Arabic (Saudi Arabia) (ar-SA)
Any valid CLDR locale code works via the API even if it's not in the demo dropdown above โ the dropdown is just a curated starting set.
All endpoints include automatic CORS headers (Access-Control-Allow-Origin: *) enabling cross-domain usage across xcojo.com subdomains.