Skip to content

Commit

Permalink
refactor(playground): add more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
s00d committed Aug 23, 2024
1 parent a0661be commit 934c48e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions playground/locales/pages/dir1/en.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"key2" : "en dir1"
}
"key2": "en dir1"
}
4 changes: 4 additions & 0 deletions playground/locales/pages/page/en.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"welcome": "Welcome, {username}! You have {unreadCount} unread messages.",
"apples": "no apples | one apple | {count} apples",
"feedback": {
"text": "test link: {link}",
"link": "click"
},
"key1": {
"key1": {
"key1": {
Expand Down
9 changes: 9 additions & 0 deletions playground/pages/page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
<strong>{{ translation.replace('page', 'page replace') }}</strong> <i>!!!</i>
</template>
</i18n-t>

<i18n-t keypath="feedback.text">
<template #link>
<nuxt-link :to="{ name: 'index' }">
<i18n-t keypath="feedback.link" />
</nuxt-link>
</template>
</i18n-t>

<p>Current Locale: {{ $getLocale() }}</p>

<div>
Expand Down

0 comments on commit 934c48e

Please sign in to comment.