title: How to translate Angular-UI-Bootstrap datepicker?
body: <p>The documentation for the datepicker (<a href="https://github.com/angular-ui/bootstrap" rel="nofollow">Angle-UI-BootStrap</a>) reports:</p>
  
  <blockquote>
    <p>Everything is formatted using the <a href="http://code.angularjs.org/1.0.8/docs/api/ng.filter%3adate" rel="nofollow">date filter</a> and thus is also
    localized.</p>
  </blockquote>
  
  <p>Checking the documentation for the <a href="http://code.angularjs.org/1.0.8/docs/api/ng.filter%3adate" rel="nofollow">date filter</a> can have access to the concept of <a href="http://code.angularjs.org/1.0.8/docs/guide/i18n" rel="nofollow">i18n and i10n</a> for AngularJs. However, the two approaches which are provided, can not be used in my application. The two approaches are:</p>
  
  <blockquote>
    <ol>
    <li><strong>Pre-bundled rule sets</strong></li>
    <li><strong>Including locale js script in index.html page</strong></li>
    </ol>
  </blockquote>
  
  <p>In my application, I check the language of the client after he had performed login. So my index.html page is already created and configured.</p>
  
  <p>There is no other way to translate the datepicker? A dynamically way... something like changing a value of the $scope that alters the interface performing the translation of the component?</p>
  
  <p>Here's a <a href="http://plnkr.co/edit/cWGahX?p=preview" rel="nofollow">plunker</a> demonstrating the approach of introducing in the index.html the translation for pt-BR.</p>
  
  <p><strong>Update:</strong>
  I asked this question in an <a href="https://github.com/angular-ui/bootstrap/issues/777" rel="nofollow">issue of the Angle-UI-Bootstrap</a>, and here is the response I received from @bekos:</p>
  
  <blockquote>
    <p>@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.</p>
  </blockquote>
  
  <p>If anyone has another solution is always welcome. If I get a solution I will return here.</p>