Loading...
Loading...
Implement localization (l10n) best practices to adapt applications for specific regions, languages, and cultural preferences.
npx skill4agent add mindrally/skills localization-l10nlocales/
en-US/
common.json
legal.json
marketing.json
en-GB/
common.json
legal.json
marketing.json
es-ES/
common.json
legal.json
marketing.json
es-MX/
common.json
legal.json
marketing.json// Format dates according to locale
const formatDate = (date: Date, locale: string) => {
return new Intl.DateTimeFormat(locale, {
year: 'numeric',
month: 'long',
day: 'numeric'
}).format(date);
};
// US: January 23, 2026
// UK: 23 January 2026
// Germany: 23. Januar 2026// Format numbers according to locale
const formatNumber = (num: number, locale: string) => {
return new Intl.NumberFormat(locale).format(num);
};
// US: 1,234,567.89
// Germany: 1.234.567,89
// France: 1 234 567,89// Format currency according to locale
const formatCurrency = (amount: number, locale: string, currency: string) => {
return new Intl.NumberFormat(locale, {
style: 'currency',
currency: currency
}).format(amount);
};
// US/USD: $1,234.56
// Germany/EUR: 1.234,56 EUR
// Japan/JPY: JPY 1,235/* Use logical properties for RTL support */
.card {
margin-inline-start: 1rem;
padding-inline-end: 0.5rem;
text-align: start;
}