Everything is formatted using the 07001 and thus is also
localized.
检查date filter的文档可以访问AngularJs的i18n and i10n概念.但是,提供的两种方法不能在我的应用程序中使用.这两种方法是:
- Pre-bundled rule sets
- Including locale js script in index.html page
在我的应用程序中,我在登录后检查客户端的语言.所以我的index.html页面已经创建并配置好了.
没有其他方法来翻译datepicker?动态方式……比如更改$scope的值,改变执行组件转换的接口的值?
这是一个plunker,展示了在index.html中引入pt-BR翻译的方法.
更新:
我在issue of the Angle-UI-Bootstrap中问了这个问题,这是我从@bekos收到的回复:
@ThCC The real problem is that you cannot change your $locale during
runtime,or at least I don’t kNow of a way to do this. Even if you
solve the problem with the datepicker,you will still have problem in
every other filter that is locale dependent,like currency. I think it
is better to ask a more general question in the AngularJS issues.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。