jack.k
jack.k

Reputation: 73

How can I translate a placeholder in angular 4 with jhi-translate?

Does anyone know how to translate a placeholder in angular 4 using jhi-translate? I have saved the translations in the Json files in i18n.

My idea below does not work .

placeholder="jhiTranslate='main.form.text'"

Upvotes: 4

Views: 2924

Answers (2)

Kamil
Kamil

Reputation: 1538

You should try this:

<span jhiTranslate="main.form.text"></span>

Upvotes: -3

br.julien
br.julien

Reputation: 3460

Try this :

placeholder="{{'main.form.text' | translate}}"

Upvotes: 6

Related Questions