Overview
amCharts 5 supports full localization, allowing you to translate chart elements and customize number, date, and time formats for different regions and languages.Available Locales
amCharts 5 includes pre-built locales for over 40 languages:- Arabic (ar)
- Bulgarian (bg_BG)
- Catalan (ca_ES)
- Czech (cs_CZ)
- Danish (da_DK)
- German (de_DE, de_CH)
- Greek (el_GR)
- English (en, en_US, en_CA)
- Spanish (es_ES)
- Estonian (et_EE)
- Finnish (fi_FI)
- Faroese (fo_FO)
- French (fr_FR)
- Hebrew (he_IL)
- Hindi (hi_IN)
- Croatian (hr_HR)
- Hungarian (hu_HU)
- Indonesian (id_ID)
- Italian (it_IT)
- Japanese (ja_JP)
- Korean (ko_KR)
- Lithuanian (lt_LT)
- Latvian (lv_LV)
- And many more…
Setting a Locale
Import and Apply
Multiple Locales
Locale Structure
A locale object contains translations and formatting settings:Number Formatting
Decimal and Thousand Separators
Locales define how numbers are formatted:Percent Signs
Number Suffixes
Customize how large and small numbers are abbreviated:Date Formatting
Date Format Codes
Locales define default date formats for different granularities:Month and Weekday Names
First Day of Week
Date Ordinals
Customize date ordinal suffixes (e.g., “1st”, “2nd”, “3rd”):Custom Translations
Extending Locales
Add custom translations to existing locales:Using Translations
Creating Custom Locales
Full Locale File
Using Custom Locale
Formatter Locales
Number Formatter
Date Formatter
Intl Locales
Use native JavaScript Intl for advanced formatting:Runtime Locale Switching
Complete Example
Best Practices
Use Pre-built Locales
Use Pre-built Locales
Start with an existing locale file and customize only what’s needed:
Translate All UI Elements
Translate All UI Elements
Don’t forget to translate:
- Chart titles and descriptions
- Axis labels
- Legend labels
- Tooltip content
- Button labels
- Export menu items
Test Number Formatting
Test Number Formatting
Verify that number formats look correct for your target locale:
- Decimal separators
- Thousand separators
- Currency symbols
- Percent signs
Consider RTL Languages
Consider RTL Languages
For right-to-left languages like Arabic or Hebrew:
Related Resources
Timezone Support
Display dates in specific timezones
Date Formatting
Learn about date and number formatters