From 2a1bea5559152cf5fc5c3554ac7aa34433f927c0 Mon Sep 17 00:00:00 2001 From: Thatcher Date: Sun, 29 Mar 2020 21:40:55 +0200 Subject: [PATCH] docs: add RTL to example (#61) * Added RTL (arabic) language * changed home, about, contact words (update from native speaker) --- example/messages/ar.json | 22 ++++++++++++++++++++++ example/messages/en.json | 8 +++++--- example/messages/es-ES.json | 10 ++++++---- example/messages/pt-BR.json | 8 +++++--- example/src/components/Nav.svelte | 10 +++++++--- example/src/i18n.js | 1 + example/src/routes/about/_locales/ar.json | 7 +++++++ example/src/routes/about/index.svelte | 14 +++++++++++--- 8 files changed, 64 insertions(+), 16 deletions(-) create mode 100644 example/messages/ar.json create mode 100644 example/src/routes/about/_locales/ar.json diff --git a/example/messages/ar.json b/example/messages/ar.json new file mode 100644 index 0000000..565be9a --- /dev/null +++ b/example/messages/ar.json @@ -0,0 +1,22 @@ +{ + "title": { + "index": "Sapper project template!" + }, + "nav": { + "home": "الرئيسية", + "about": "من نحن", + "blog": "اتصل بنا" + }, + "messages": { + "success": "عظيم", + "high_five": "خمسة", + "try_editing": "حاول تحرير هذا الملف (src/routes/index.svelte) لاختبار إعادة التحميل المباشر." + }, + "languages": { + "en": "English", + "pt_BR": "Português", + "es_ES": "Espanol", + "ar": "عربى" + }, + "direction": "rtl" +} diff --git a/example/messages/en.json b/example/messages/en.json index ac0c5e2..6320365 100644 --- a/example/messages/en.json +++ b/example/messages/en.json @@ -13,8 +13,10 @@ "try_editing": "Try editing this file (src/routes/index.svelte) to test live reloading." }, "languages": { - "pt_BR": "Portugues", "en": "English", - "es_ES": "Spanish" - } + "pt_BR": "Português", + "es_ES": "Espanol", + "ar": "عربى" + }, + "direction": "ltr" } diff --git a/example/messages/es-ES.json b/example/messages/es-ES.json index 826134b..5a22188 100644 --- a/example/messages/es-ES.json +++ b/example/messages/es-ES.json @@ -13,8 +13,10 @@ "try_editing": " Intente editar este archivo (src/routes/index.svelte) para probar la recarga en vivo." }, "languages": { - "pt_BR": "Portugués", - "en": "Ingles", - "es_ES": "Espanol" - } + "en": "English", + "pt_BR": "Português", + "es_ES": "Espanol", + "ar": "عربى" + }, + "direction": "ltr" } diff --git a/example/messages/pt-BR.json b/example/messages/pt-BR.json index 1997c22..6bb89cb 100644 --- a/example/messages/pt-BR.json +++ b/example/messages/pt-BR.json @@ -13,8 +13,10 @@ "try_editing": "Tente editar este arquivo (src/routes/index.svelte) para testar o recarregamento ao vivo." }, "languages": { + "en": "English", "pt_BR": "Português", - "en": "Inglês", - "es_ES": "Espanhol" - } + "es_ES": "Espanol", + "ar": "عربى" + }, + "direction": "ltr" } diff --git a/example/src/components/Nav.svelte b/example/src/components/Nav.svelte index 3afb4a5..2675190 100644 --- a/example/src/components/Nav.svelte +++ b/example/src/components/Nav.svelte @@ -51,10 +51,14 @@ padding: 1em 0.5em; display: block; } + .rtl { + direction: rtl; + display: flex; + } -