码迷,mamicode.com
首页 > 其他好文 > 详细

[Angular] Introduction to Angular Internationalization (i18n)

时间:2019-02-07 21:53:23      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:tran   nali   pre   inter   nat   his   mic   extra   end   

To add translation to the application:

<button (click)="onEditCourse()" i18n>Edit button</button>

‘i18n‘ is for Angular CLI to extract all the string which need to be translated.

 

Run:

ng xi18n

 

It will generate messages.xif, this file will be sent to the translator interface, then we can add translation for the application.

 

It is possible to provide custom message, description or even id for the translation, but it is not recommended.

技术图片

技术图片

技术图片

[Angular] Introduction to Angular Internationalization (i18n)

标签:tran   nali   pre   inter   nat   his   mic   extra   end   

原文地址:https://www.cnblogs.com/Answer1215/p/10353818.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!