basic implementation of i18n for text

This commit is contained in:
lostdesign
2019-06-20 13:34:08 +02:00
parent 44cf7cb0cf
commit 8f7730c48f
5 changed files with 17 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
aside.nav aside.nav
.sidebar .sidebar
template(v-for='category in categories') template(v-for='category in categories')
//- nuxt-link(:to='$i18n.path(category.slug)') {{ category.title }}
nuxt-link(:to='category.slug') {{ category.title }} nuxt-link(:to='category.slug') {{ category.title }}
</template> </template>

5
locales/de.json Normal file
View File

@@ -0,0 +1,5 @@
{
"general": {
"siteTitle": "Was ist 💎 webgems?"
}
}

5
locales/en.json Normal file
View File

@@ -0,0 +1,5 @@
{
"general": {
"siteTitle": "What is 💎 webgems?"
}
}

5
locales/fr.json Normal file
View File

@@ -0,0 +1,5 @@
{
"general": {
"siteTitle": "What is 💎 webgems?"
}
}

View File

@@ -1,8 +1,7 @@
<template lang="pug"> <template lang="pug">
.welcome .welcome
main main
h1.text-black.font-bold.text-xl.mb-2 What is&nbsp; h1.text-black.font-bold.text-xl.mb-2 {{ $t('general.siteTitle') }}
span 💎 webgems?
p Webgems is a goto place for devs and designers to find new resources and more. As a beginner it's sometimes not easy to find what you need since you don't know what you should look for. p Webgems is a goto place for devs and designers to find new resources and more. As a beginner it's sometimes not easy to find what you need since you don't know what you should look for.
p Therefore i created this project to have the most common and best resources for beginners and veterans in one place. Kinda like a bookmarks list for devs and designers, containing only the best gems out there. p Therefore i created this project to have the most common and best resources for beginners and veterans in one place. Kinda like a bookmarks list for devs and designers, containing only the best gems out there.
p If you want to add your own gem, go ahead and open a pull request on github (click on that octocat at the top right corner).&nbsp; p If you want to add your own gem, go ahead and open a pull request on github (click on that octocat at the top right corner).&nbsp;