diff options
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/i18n.js | 12 | ||||
| -rw-r--r-- | src/config/translations/en.json | 6 | ||||
| -rw-r--r-- | src/config/translations/es.json | 7 |
3 files changed, 25 insertions, 0 deletions
diff --git a/src/config/i18n.js b/src/config/i18n.js new file mode 100644 index 0000000..25ffc45 --- /dev/null +++ b/src/config/i18n.js @@ -0,0 +1,12 @@ +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', + initialLocale: getLocaleFromNavigator() +}); diff --git a/src/config/translations/en.json b/src/config/translations/en.json new file mode 100644 index 0000000..c5c0cef --- /dev/null +++ b/src/config/translations/en.json @@ -0,0 +1,6 @@ +{ + "refresh": "Get a new prompt.", + "title": "Your prompt is:", + "loading": "Finding your prompt..." +} + diff --git a/src/config/translations/es.json b/src/config/translations/es.json new file mode 100644 index 0000000..914970b --- /dev/null +++ b/src/config/translations/es.json @@ -0,0 +1,7 @@ +{ + "refresh": "Genera un prompt nuevo.", + "title": "Tu prompt es:", + "loading": "Encontrando tu prompt..." +} + + |