Indietro

#locale

4 APIs con questa etichetta

Localized Names API

Get the localized display name of a code in any language — countries and regions, languages, currencies, scripts and calendars. Pass a code, a type and a locale and the name endpoint returns the right name: US as region in fr gives "États-Unis", de as language in fr gives "allemand", EUR as currency gives "Euro", and the same code reads correctly in German, Japanese, Arabic or any other locale. The list endpoint returns every code of a type localized and sorted in that locale's collation — ideal for building a country, language or currency dropdown in any language. Powered by the platform's full ICU data (Intl.DisplayNames) and computed locally with no network calls. Built for internationalised forms and pickers, multilingual UIs, localized reports and onboarding. A localized-names resolver — distinct from country reference data in English (countries), number and currency formatting (numberformat) and locale date formatting (datelocale). No upstream key, no cache.

api.oanor.com/displaynames-api

Relative Time & Locale Date API

Humanise timestamps and format dates for any locale and timezone using full ICU. The relative endpoint turns an instant into a localised relative phrase against now (or a given reference time) — "3 hours ago", "vor 3 Stunden", "in 2 days", "il y a 5 minutes" — automatically choosing the best unit from seconds to years. The format endpoint renders a localised date/time string (e.g. "mardi 2 juin 2026 à 15:30" or "2026年6月2日 22:30:00"), honouring the locale (BCP 47), a named IANA timezone, the chosen date and time styles (full/long/medium/short) and 12/24-hour preference, and returns a parts breakdown for custom displays. Pass dates as ISO 8601 or unix timestamps. Everything is computed locally with no network calls. Ideal for internationalised UIs, activity feeds, notifications, comments and dashboards. A relative-time and locale date formatter — distinct from current-time-in-a-timezone (time), the UTC parse/token toolkit (datetime) and number/currency formatting (numberformat). No upstream key, no cache.

api.oanor.com/datelocale-api

Number & Currency Formatter API

Format numbers for any locale using full ICU data — the correct way to display money, percentages and measurements per region. Pass a value and a style and the format endpoint returns the locale-correct string: decimal, currency (any ISO 4217 code, with the right symbol and grouping — e.g. 1.234.567,89 € in de-DE, $1,234,567.89 in en-US, ¥1,234,567 in ja-JP, and the Indian lakh grouping 12,34,567.89 in hi-IN), percent, or unit (e.g. 80 km/h). Control the locale (BCP 47), minimum/maximum fraction digits, grouping, sign display and notation (standard, scientific, engineering or compact like 1.2M). A parts endpoint returns the formatToParts breakdown (integer, group, decimal, fraction, currency symbol…) for building custom-styled displays. Everything is computed locally with no network calls. Ideal for internationalised UIs, invoices and receipts, dashboards and reports. A locale number/currency formatter — distinct from foreign-exchange rates (currency), number-to-words (numberwords) and the numeral-base converter (baseconvert). No upstream key, no cache.

api.oanor.com/numberformat-api

BCP 47 语言标签 API

IETF BCP 47 语言标签(区域设置)作为 API,基于 IANA 语言子标签注册表构建 — 9,200+ 子标签(语言、文字、地区、变体、扩展语言和遗留标签)。主要端点 /parse 验证并分解任何语言标签(例如 zh-Hant-TW → 中文 + 繁体汉字 + 台湾;en-Latn-US、de-CH-1996、i-klingon)为带标签的子标签,标记无效或已弃用的部分,并识别预注册的冗余/遗留标签。查找单个子标签(de → 德语、Hant → 繁体汉字、419 → 拉丁美洲),或按描述搜索注册表。非常适合国际化(i18n)、区域设置验证、内容协商和语言感知应用。

api.oanor.com/bcp47-api