Change language to pt-br [ngx-boostrap]

℡╲_俬逩灬. 提交于 2019-12-08 07:35:42

问题


How i can change de langiage os BSdatePicker to pt_br I tried to modify in bs-locale-service so i have this mensage of error Khronos locale error: please load locale "pt-br" before using it


回答1:


First step is to add locale to Chronos

import { defineLocale } from 'ngx-bootstrap/chronos';
import { ptBrLocale } from 'ngx-bootstrap/locale';
defineLocale('pt-br', ptBrLocale); 

Second step, say datepicker to use this locale:

 constructor(private localeService: BsLocaleService) {
   localeService.use('pt-br');
 }


来源:https://stackoverflow.com/questions/50260815/change-language-to-pt-br-ngx-boostrap

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!