GET/v1/locale
How a locale writes things: first day of week, weekend, 12/24-hour clock, number and currency formats, date patterns, text direction
Pass currency to see money formatting, amount and date to format your own values. Everything comes from CLDR via the runtime.
PARAMETERS
- tagquery · stringREQUIRED
- BCP 47 locale tage.g. de-DE
- currencyquery · string
- Currency to format (default: the region's)e.g. EUR
- amountquery · number
- Number to format in the examples (default 1234567.891)e.g. 1.5
- datequery · string
- Date to format in the examplese.g. string
REQUEST
curl "https://api.apialmanac.com/v1/locale?tag=de-DE" \ -H "X-API-Key: YOUR_KEY"
import requests
r = requests.get("https://api.apialmanac.com/v1/locale?tag=de-DE", headers={"X-API-Key": "YOUR_KEY"})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.apialmanac.com/v1/locale?tag=de-DE", {
headers: { "X-API-Key": "YOUR_KEY" }
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200OK
{
"tag": "de-DE",
"language": "de",
"script": "Latn",
"region": "DE",
"likely_subtags": "de-Latn-DE",
"direction": "ltr",
"week": {
"first_day": "Monday",
"first_day_iso": 1,
"weekend": [
"Saturday",
"Sunday"
],
"minimal_days_in_first_week": 4
},
"hour_cycle": "h23",
"calendars": [
"gregory"
],
"numbering_systems": [
"latn"
],
"measurement_system": "metric",
"paper_size": "A4",
"number": {
"example": "1.234.567,891",
"decimal_separator": ",",
"group_separator": ".",
"numbering_system": "latn",
"percent_example": "25,6 %",
"compact_example": "1,2 Mio."
},
"currency": {
"currency": "EUR",
"example": "1.234.567,89 €",
"symbol": "€",
"symbol_position": "after",
"accounting_negative": "-1.234.567,89 €",
"minor_units": 2
},
"dates": {
"short": {
"pattern": "dd.MM.yy",
"example": "09.10.26"
},
"medium": {
"pattern": "dd.MM.yyyy",
"example": "09.10.2026"
},
"long": {
"example": "9. Oktober 2026"
},
"full": {
"example": "Freitag, 9. Oktober 2026"
},
"time_short": "14:30",
"uses_12_hour_clock": false
},
"names": {
"language": {
"english": "German",
"native": "Deutsch"
},
"region": {
"code": "DE",
"english": "Germany",
"native": "Deutschland"
},
"script": {
"code": "Latn",
"english": "Latin"
}
}
}