From 862a5f9cdbbda522c608ea63c1e296e81f44de10 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Sat, 20 Jun 2020 16:20:31 +0200 Subject: Add internationalization support --- app/config/i18n.js | 2 ++ app/config/translations/en.json | 21 +++++++++++++++++++++ app/config/translations/es.json | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 app/config/translations/es.json (limited to 'app/config') diff --git a/app/config/i18n.js b/app/config/i18n.js index e00adb5..25ffc45 100644 --- a/app/config/i18n.js +++ b/app/config/i18n.js @@ -1,8 +1,10 @@ import { addMessages, getLocaleFromNavigator, init } from 'svelte-i18n'; import en from './translations/en.json'; +import es from './translations/es.json'; addMessages('en', en); +addMessages('es', es); init({ fallbackLocale: 'en', diff --git a/app/config/translations/en.json b/app/config/translations/en.json index 935f4fe..468bdc1 100644 --- a/app/config/translations/en.json +++ b/app/config/translations/en.json @@ -5,9 +5,30 @@ "message": "Unknown error has occurred. Panic!" } }, + "footer": { + "choose_language": "Choose your language", + "license": "Forum is open source." + }, "forum_list": { "error": { "unavailable": "Forum list unavailable." } + }, + "forum": { + "name": { + "everything": "Everything", + "us": "Us", + "words": "Words", + "sound": "Sounds", + "structure": "Structure", + "interaction": "Interaction", + "emotion": "Emotion", + "movement": "Movement", + "belief": "Belief", + "experience": "Experience", + "online": "Online", + "the_world": "The World", + "life": "Life" + } } } diff --git a/app/config/translations/es.json b/app/config/translations/es.json new file mode 100644 index 0000000..8831d2a --- /dev/null +++ b/app/config/translations/es.json @@ -0,0 +1,34 @@ +{ + "error": { + "generic": { + "title": "Error!", + "message": "Hubo un error desconocido. Entra en pánico!" + } + }, + "footer": { + "choose_language": "Escoge un lenguaje", + "license": "Forum es software libre." + }, + "forum_list": { + "error": { + "unavailable": "Lista de foros no disponible." + } + }, + "forum": { + "name": { + "everything": "Todo", + "us": "Nosotros", + "words": "Palabras", + "sound": "Sonidos", + "structure": "Estructura", + "interaction": "Interacción", + "emotion": "Emoción", + "movement": "Movimiento", + "belief": "Creencia", + "experience": "Experiencia", + "online": "En Línea", + "the_world": "El Mundo", + "life": "Vida" + } + } +} -- cgit