title: How do I change the npx bootstrap datepicker language to pt-br?
body: <p>I am doing a project in Angular 4, I installed the ngx bootstrap and the date picker is in English. I inserted the following lines in app.module.ts:</p>
  
  <pre><code>import { defineLocale } from 'ngx-bootstrap/chronos';
  import { ptBrLocale } from 'ngx-bootstrap/locale';
  defineLocale('pt-br', ptBrLocale); 
  </code></pre>
  
  <p>Then I went into the component of the page where I'm calling my datepicker, I made the imports and I declared: </p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { BsDatepickerConfig, BsLocaleService } from 'ngx-bootstrap/datepicker';
  import { listLocales } from 'ngx-bootstrap/chronos';
  </code></pre>
  
  <p>and </p>
  
  <pre><code>@Component({
    selector: 'demo-datepicker-change-locale',
    templateUrl: './cancelar-agendamentos-consulta.component.html'
  })
  export class DemoDatepickerChangeLocaleComponent {
    locale = 'pt-br';
    locales = listLocales();
  
    constructor(private _localeService: BsLocaleService) {
    }
  
    applyLocale(pop: any) {
      this._localeService.use(this.locale);
      pop.hide();
      pop.show();
    }
  }
  </code></pre>
  
  <p>And it still did not work. What am I doing wrong?</p>