如何翻译ng-bootstrap输入日期选择器-NgbInputDatepicker i18n? [英] How to translate ng-bootstrap input date-picker - NgbInputDatepicker i18n?
本文介绍了如何翻译ng-bootstrap输入日期选择器-NgbInputDatepicker i18n?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们正在使用'ng-bootstrap'日期选择器输入组件.
We are using the 'ng-bootstrap' date picker input component.
While the date-picker itself can be translated using NgbDatepickerI18n
according to the example at this plnkr, the input date picker uses the NgbInputDatepicker
directive.
如何使用与翻译日期选择器相同的服务来翻译此指令?
How can this directive be translated using the same services that are used for translating the date-picker?
推荐答案
您将使用完全相同的方法.切换NgbInputDatepicker时,将显示NgbDatepicker,该NgbDatepicker从服务获取其标签.
You would use the exact same way. The NgbInputDatepicker, when toggled, displays an NgbDatepicker, which gets its labels from a service.
这篇关于如何翻译ng-bootstrap输入日期选择器-NgbInputDatepicker i18n?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文