Locale Chuyển đổier
Normalize locale identifiers online. Chuyển đổi BCP 47 tags, POSIX locale strings, ICU-style values, and Accept-Language headers into clean locale formats with live browser Intl previews.
Paste a locale tag, POSIX locale string, or Accept-Language header.
Normalized Locale Output
Use these values in HTML lang attributes, Intl APIs, Accept-Language headers, or server locale environment variables.
Parsed Locale
Format Alternatives
Resolved Intl Locales
Fallback Chain
Live Intl Preview
Locale Comparison
Compare locale formatting side by side for the same sample data.
Common Locale Conversion Ví dụ
en_US.UTF-8
Output
en-US
Common POSIX locale from shell environments and Linux servers.
zh_Hans_CN
Output
zh-Hans-CN
ICU-style locale with explicit script and region.
sr_RS@latin
Output
sr-Latn-RS
POSIX modifier converted into a script subtag.
Accept-Language: fr-CA,fr;q=0.9
Output
fr-CA
Browser header reduced to the primary requested locale.
Cách sử dụng công cụ này
- Enter a locale tag, POSIX locale string, or Accept-Language header from your app, browser, or server logs.
- Check the canonical BCP 47 locale, POSIX form, HTML lang value, and Accept-Language fallback chain.
- Use the preview cards to confirm how Intl resolves dates, numbers, relative time, and sorting for that locale.
Trang này trả lời điều gì
- How do I convert en_US.UTF-8 into a browser locale tag?
- What locale should I put in an HTML lang attribute or Intl API call?
- How does an Accept-Language header map to a primary requested locale?
- Which locale does the browser actually resolve for numbers, dates, and sorting?
Câu hỏi thường gặp
It normalizes common locale inputs such as en_US.UTF-8, zh_Hans_CN, sr_RS@latin, and Accept-Language headers into cleaner locale formats for browser and application use.
BCP 47 uses dash-separated tags like en-US for web and Intl APIs, while POSIX locale strings often use underscores and charsets such as en_US.UTF-8 for servers and shell environments.
Yes. Paste a full header such as Accept-Language: fr-CA,fr;q=0.9 and the tool extracts the primary locale and shows a fallback chain.
Browser Intl APIs can fall back to a supported parent locale or canonical variant. The resolved locale cards show what NumberFormat, DateTimeFormat, ListFormat, RelativeTimeFormat, and Collator actually use.
The parsing and preview logic run in the browser, so you can inspect locale behavior instantly without sending the locale input to a conversion API.