看来,angularjs嵌入了一些国际化的资源:
Angular supports i18n/l10n for date,number and currency filters.
Additionally,Angular supports localizable pluralization support
through the ngpluralize directive. All localizable Angular components
depend on locale-specific rule sets managed by the $locale service.
如果发现$locale
service,但不要kwNow如何在fr-fr中指定区域设置
以下代码:
{{article.date_collected | date:'EEEE dd MMMM yyyy'}}
给予:
Monday 06 October 2014
但我想要 :
Lundi 06 Octobre 2014
有什么建议么?
最后,我发现在角度github页面上的响应:
https://github.com/angular/bower-angular-i18n#bower-angular-i18n
https://github.com/angular/bower-angular-i18n#bower-angular-i18n
编辑:更多的信息,为我工作
在您的根应用程序目录中,从bower安装资源
bower install angular-i18n
添加< script>如果您使用bower / buildjs将所有脚本压缩到vendor.js文件,请在此评论标签之间的index.html:
<!-- endbower --> <script src="bower_components/angular-i18n/angular-locale_fr-fr.js"></script> <!-- endbuild -->
而已.
原文地址:https://www.jb51.cc/angularjs/142786.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。