(5)FPQuant JHipster

    xiaoxiao2021-03-25  91

    本文是对JHipster开发文档的部分翻译,供个人学习之用。

    原文链接:https://jhipster.github.io/development/

    对于AngularJS1,Angular Translate为i18n提供了一个简单的AngularJS指令。

    对于AngularJS2+,使用NG2 translate和一个特定的JHipster组件(与Angular Translate执行方式相同,并使用的相同的文件)。

    例如,为了对first name域添加一个翻译,只要将translate属性加到key上:

    <label translate="settings.form.firstname">First Name</label>

    这个key引用了一个JSON文档:返回翻译好的字符串。Angular会将翻译的版本来替换"First Name"这个字符串。

    转载请注明原文地址: https://ju.6miu.com/read-20545.html

    最新回复(0)