diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index f85056b..91ba4cb 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -20,6 +20,13 @@ const messages: LocaleMessages = { serverError: 'Server error occurred', networkError: 'Network connection error' }, + locales: { + en: 'English', + es: 'Spanish', + fr: 'French', + de: 'German', + zh: 'Chinese' + }, dateTimeFormats: { short: { year: 'numeric', diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index ba7a38c..ee762e4 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -1,11 +1,61 @@ -export default { +import type { LocaleMessages } from '../types' + +const messages: LocaleMessages = { nav: { + title: 'Título de la Aplicación', home: 'Inicio', directory: 'Directorio', - faq: 'Preguntas', - title: 'Titulo Aqui', + faq: 'Preguntas Frecuentes', support: 'Soporte', login: 'Iniciar Sesión', logout: 'Cerrar Sesión' }, -} + common: { + loading: 'Cargando...', + error: 'Ha ocurrido un error', + success: 'Operación exitosa' + }, + errors: { + notFound: 'Página no encontrada', + serverError: 'Error del servidor', + networkError: 'Error de conexión de red' + }, + locales: { + en: 'Inglés', + es: 'Español', + fr: 'Francés', + de: 'Alemán', + zh: 'Chino' + }, + dateTimeFormats: { + short: { + year: 'numeric', + month: 'short', + day: 'numeric' + }, + long: { + year: 'numeric', + month: 'long', + day: 'numeric', + weekday: 'long', + hour: 'numeric', + minute: 'numeric' + } + }, + numberFormats: { + currency: { + style: 'currency', + currencyDisplay: 'symbol' + }, + decimal: { + style: 'decimal', + minimumFractionDigits: 2 + }, + percent: { + style: 'percent', + useGrouping: false + } + } +} + +export default messages diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts new file mode 100644 index 0000000..795e77a --- /dev/null +++ b/src/i18n/locales/fr.ts @@ -0,0 +1,61 @@ +import type { LocaleMessages } from '../types' + +const messages: LocaleMessages = { + nav: { + title: 'Titre de l\'Application', + home: 'Accueil', + directory: 'Répertoire', + faq: 'FAQ', + support: 'Support', + login: 'Connexion', + logout: 'Déconnexion' + }, + common: { + loading: 'Chargement...', + error: 'Une erreur est survenue', + success: 'Opération réussie' + }, + errors: { + notFound: 'Page non trouvée', + serverError: 'Erreur du serveur', + networkError: 'Erreur de connexion réseau' + }, + locales: { + en: 'Anglais', + es: 'Espagnol', + fr: 'Français', + de: 'Allemand', + zh: 'Chinois' + }, + dateTimeFormats: { + short: { + year: 'numeric', + month: 'short', + day: 'numeric' + }, + long: { + year: 'numeric', + month: 'long', + day: 'numeric', + weekday: 'long', + hour: 'numeric', + minute: 'numeric' + } + }, + numberFormats: { + currency: { + style: 'currency', + currencyDisplay: 'symbol' + }, + decimal: { + style: 'decimal', + minimumFractionDigits: 2 + }, + percent: { + style: 'percent', + useGrouping: false + } + } +} + +export default messages \ No newline at end of file diff --git a/src/i18n/types.ts b/src/i18n/types.ts index f812fda..729e969 100644 --- a/src/i18n/types.ts +++ b/src/i18n/types.ts @@ -19,6 +19,14 @@ export interface LocaleMessages { 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: {