- Extend `LocaleMessages` type with `locales` field for language names - Update English, Spanish, and French locales with native language names - Enhance internationalization type safety and locale representation
61 lines
No EOL
1 KiB
TypeScript
61 lines
No EOL
1 KiB
TypeScript
export interface LocaleMessages {
|
|
nav: {
|
|
title: string
|
|
home: string
|
|
directory: string
|
|
faq: string
|
|
support: string
|
|
login: string
|
|
logout: string
|
|
}
|
|
// Add more message categories here
|
|
common: {
|
|
loading: string
|
|
error: string
|
|
success: string
|
|
}
|
|
errors: {
|
|
notFound: string
|
|
serverError: string
|
|
networkError: string
|
|
}
|
|
// Language names in the current language
|
|
locales: {
|
|
en: string
|
|
es: string
|
|
fr: string
|
|
de: string
|
|
zh: string
|
|
}
|
|
// Add date/time formats
|
|
dateTimeFormats: {
|
|
short: {
|
|
year: 'numeric'
|
|
month: 'short'
|
|
day: 'numeric'
|
|
}
|
|
long: {
|
|
year: 'numeric'
|
|
month: 'long'
|
|
day: 'numeric'
|
|
weekday: 'long'
|
|
hour: 'numeric'
|
|
minute: 'numeric'
|
|
}
|
|
}
|
|
// Add number formats
|
|
numberFormats: {
|
|
currency: {
|
|
style: 'currency'
|
|
currencyDisplay: 'symbol'
|
|
}
|
|
decimal: {
|
|
style: 'decimal'
|
|
minimumFractionDigits: 2
|
|
}
|
|
percent: {
|
|
style: 'percent'
|
|
useGrouping: false
|
|
}
|
|
}
|
|
}
|