diff --git a/example/messages/default.json b/example/messages/default.json index c3b7e92..fb80aae 100644 --- a/example/messages/default.json +++ b/example/messages/default.json @@ -1,10 +1,7 @@ { "title": { - "about": "About", "index": "Sapper project template!" }, - "about_this_site": "About this site", - "about_content": ["This is the 'about' page. There's not much here."], "messages": { "success": "Great success!", "high_five": "High five", diff --git a/example/messages/en-US.json b/example/messages/en-US.json index c3b7e92..fb80aae 100644 --- a/example/messages/en-US.json +++ b/example/messages/en-US.json @@ -1,10 +1,7 @@ { "title": { - "about": "About", "index": "Sapper project template!" }, - "about_this_site": "About this site", - "about_content": ["This is the 'about' page. There's not much here."], "messages": { "success": "Great success!", "high_five": "High five", diff --git a/example/messages/es-ES.json b/example/messages/es-ES.json index 0efe216..bdab2c7 100644 --- a/example/messages/es-ES.json +++ b/example/messages/es-ES.json @@ -1,10 +1,7 @@ { "title": { - "about": "Acerca de", "index": " Plantilla de proyecto Sapper!" }, - "about_this_site": " Acerca de este sitio", - "about_content": ["Esta es la página 'acerca de'. No hay mucho aquí."], "messages": { "success": "Gran éxito!", "high_five": "Cinco altos", diff --git a/example/messages/pt-BR.json b/example/messages/pt-BR.json index 012af99..f329c42 100644 --- a/example/messages/pt-BR.json +++ b/example/messages/pt-BR.json @@ -1,10 +1,7 @@ { "title": { - "about": "Sobre", "index": "Modelo de projeto em Sapper!" }, - "about_this_site": "Sobre este site", - "about_content": ["Esta é a página 'sobre'. Não há muito aqui."], "messages": { "success": "Suuuucesso!", "high_five": "Toca aqui", diff --git a/example/src/routes/_layout.svelte b/example/src/routes/_layout.svelte index c276ca9..22b39e7 100644 --- a/example/src/routes/_layout.svelte +++ b/example/src/routes/_layout.svelte @@ -1,5 +1,5 @@ - - - {$_('title.about', { default: 'About' })} - - -

{$_('about_this_site', { default: 'About this site' })}

- -

- {$_('about_content[0]', { - default: "This is the 'about' page. There's not much here.", - })} -

diff --git a/example/src/routes/about/_locales/default.json b/example/src/routes/about/_locales/default.json new file mode 100644 index 0000000..4b22138 --- /dev/null +++ b/example/src/routes/about/_locales/default.json @@ -0,0 +1,7 @@ +{ + "title": { + "about": "About" + }, + "about_this_site": "About this site", + "about_content": ["This is the 'about' page. There's not much here."] +} diff --git a/example/src/routes/about/_locales/en-US.json b/example/src/routes/about/_locales/en-US.json new file mode 100644 index 0000000..4b22138 --- /dev/null +++ b/example/src/routes/about/_locales/en-US.json @@ -0,0 +1,7 @@ +{ + "title": { + "about": "About" + }, + "about_this_site": "About this site", + "about_content": ["This is the 'about' page. There's not much here."] +} diff --git a/example/src/routes/about/_locales/es-ES.json b/example/src/routes/about/_locales/es-ES.json new file mode 100644 index 0000000..53e4353 --- /dev/null +++ b/example/src/routes/about/_locales/es-ES.json @@ -0,0 +1,7 @@ +{ + "title": { + "about": "Acerca de" + }, + "about_this_site": " Acerca de este sitio", + "about_content": ["Esta es la página 'acerca de'. No hay mucho aquí."] +} diff --git a/example/src/routes/about/_locales/pt-BR.json b/example/src/routes/about/_locales/pt-BR.json new file mode 100644 index 0000000..2dc5e8f --- /dev/null +++ b/example/src/routes/about/_locales/pt-BR.json @@ -0,0 +1,7 @@ +{ + "title": { + "about": "Sobre" + }, + "about_this_site": "Sobre este site", + "about_content": ["Esta é a página 'sobre'. Não há muito aqui."] +} diff --git a/example/src/routes/about/index.svelte b/example/src/routes/about/index.svelte new file mode 100644 index 0000000..7310b21 --- /dev/null +++ b/example/src/routes/about/index.svelte @@ -0,0 +1,27 @@ + + + + + + {$_('title.about', { default: 'About' })} + + +

{$_('about_this_site', { default: 'About this site' })}

+ +

+ {$_('about_content[0]', { + default: "This is the 'about' page. There's not much here.", + })} +