1
Angular.io는 I18N 태그를 설명각도로 동적 콘텐츠의 국제화? 다음
각도 I18N 특성 병진 콘텐츠를 표시한다. 고정 된 텍스트가 번역 될 모든 요소 태그를 에 놓습니다.
제 질문은 이것입니다. 콘텐츠가 동적 인 요소가 있다면 어떻게해야합니까? 예를 들어 자산 목록을 보여주는 아래 표를 참조하십시오. '설명'열은 경우에 따라 영어와 경우에 따라 다른 언어로 표시되어야합니다.
<table class="asset-table">
<thead>
<tr>
<th i18n="@@alarm-list-timeon">Time On</th>
<th i18n="@@alarm-list-timeoff">Time Off</th>
<th i18n="@@alarm-list-asset">Asset</th>
<th i18n="@@alarm-list-description">Description</th>
</tr>
</thead>
<tbody *ngIf="showAssets">
<tr *ngFor="let asset of pageItems">
<td>{{asset.timeon}}</td>
<td>{{asset.timeoff}}</td>
<td>{{asset.assetlabel}}</td>
<td i18n="@@{{asset.description}}">{{asset.description}}</td>
</tr>
</tbody>
</table>
을 ... 그러나 나는 틀렸다 :
<table class="asset-table">
<thead>
<tr>
<th i18n="@@alarm-list-timeon">Time On</th>
<th i18n="@@alarm-list-timeoff">Time Off</th>
<th i18n="@@alarm-list-asset">Asset</th>
<th i18n="@@alarm-list-description">Description</th>
</tr>
</thead>
<tbody *ngIf="showAssets">
<tr *ngFor="let asset of pageItems">
<td>{{asset.timeon}}</td>
<td>{{asset.timeoff}}</td>
<td>{{asset.assetlabel}}</td>
<td i18n>{{asset.description}}</td>
</tr>
</tbody>
</table>
나는 이런 식으로 뭔가를 생각했다. 어떤 제안?
각도 i18n은 동적이 아닌 정적입니다. – Ploppy