Vue-i18n: Cannot render text to input placeholder?

Created on 12 Oct 2016  路  5Comments  路  Source: kazupon/vue-i18n

<input type="text" name="name" class="form-control" required="" placeholder="{{ $t("expense.formNamePlaceholder") }}">

becomes:

") }}">

Most helpful comment

[SOLVED]
@kazupon @zeusLeeJh by Vue JS 2 you should do this: https://jsfiddle.net/2av8r31w/3/
I think this (v-bind) needs to be in Vue I18n documentation though.

All 5 comments

Sorry, for the late response. :bow:

Can you provide the minimum reproduction code with jsfiddle (or other), and environments (vue version, etc) please?

@kazupon I also have this question in my project. I am using vue2.0 and here is my code.

HTML

<input type="text" placeholder="{{ $t("hello") }}">

Json

hello: 'hello world'

and then it doesn't work just perform like this

place

and i also try like this (delete the double quotes after placeholder= )
<input type="text" placeholder={{ $t("hello") }}>

and it will perform like this

default

I think it must to be a bug for vue-i18n. the vue-i18n can't work with the style attribute.

[SOLVED]
@kazupon @zeusLeeJh by Vue JS 2 you should do this: https://jsfiddle.net/2av8r31w/3/
I think this (v-bind) needs to be in Vue I18n documentation though.

@forddyce Thanks a lot, it works. I think it may be a bug about {{ }}.

@forddyce worked for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

polikin picture polikin  路  4Comments

zhangruinian picture zhangruinian  路  4Comments

jarikmarwede picture jarikmarwede  路  4Comments

koslo picture koslo  路  5Comments

cslee picture cslee  路  5Comments