2

I want to inject a translated text into a component.

<my-component [text]="_A_TRANSLATED_TEXT_" /> 

Following the doc, https://angular.io/docs/ts/latest/cookbook/i18n.html, I don't find this kind of basic feature. Any idea how to do?

Thank

1 Answer 1

4

It seems possible to use this kind of syntax

<app-mycomp i18n param="my param" i18n-param another_param="my param" i18n-another_param> my text </app-mycomp> 

So i18n will affect to content of the tag, and i18n-* will affect the corresponding attribute. Seem not documented yet.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.