-
-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What about directive? #5
Comments
Hi @Disorrder !! The I think that current translation style is simple than better angular translate style. Also, it's flexible as in the following code (e.g. inline, computed property and method). I don't plan to add feature in future. |
分かった :D Vue.directive('translate', {
isLiteral: true,
update(val) {
this.el.innerHTML = this.vm.$t(val);
}
}) span(v-if="error", v-translate="error.{{error}}") |
Yes ! |
@Disorrder this would have also worked: <a :v-text="$t('error.' + error)"></a> |
Please, make it useful like angular-translate. I mean, it's really good to use it by directive and filter
For example,
Renders into
The text was updated successfully, but these errors were encountered: