Skip to content

Commit f17ff70

Browse files
committed
feat: adding translation comp in code support
1 parent b119851 commit f17ff70

15 files changed

+134
-876
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,17 @@ tc('key.static', 0) tc("key.static", 1) tc(`key.static`, 2)
115115
<i18n-t keypath="key.component"></i18n-t>
116116
<Translate keypath="key.component"></Translate>
117117
```
118+
118119
> Note: As of right now there is no support for binding in a path like `:path="condition ? 'string1' : 'string2'"` there is just support for strings as shown above.
119120
121+
- i18n component in code:
122+
```js
123+
const TranslationComponentInCode = h(Translation, {
124+
keypath: 'Translation component in code.',
125+
tag: 'p',
126+
});
127+
```
128+
120129
- v-t directive with string literal:
121130
```html
122131
<p v-t="'key.directive'"></p>

0 commit comments

Comments
 (0)