title: bootstrap-datepicker set language globally
body: <p>I'm using <a href="http://jondmiles.com/bootstrap-datepaginator/" rel="noreferrer">bootstrap-datepaginator</a> that inside uses bootstrap-datepicker. 
  Utilizzanto bootstrap-datepicker as a single component, there are no problems to set the language, but the same is not true using bootstrap-datepaginator. How can I do?</p>
  
  <p>I'm trying to set the Italian language as a default for the entire project. 
  In <code>index.html</code> I put the following script:</p>
  
  <pre><code>&lt;script src="vendors/bootstrap-datepicker/js/bootstrap-datepicker.js"&gt;&lt;/script&gt;
  &lt;script src="vendors/jquery-ui/ui/i18n/datepicker-it.js"&gt;&lt;/script&gt;
  
  &lt;script&gt;
      $(function() {
          $( "#datepicker" ).datepicker( $.datepicker.regional[ "it" ] );
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>But in the console I get these errors:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'regional' of undefined datepicker-it.js:15
  Uncaught TypeError: Cannot read property 'regional' of undefined (index):394
  </code></pre>
  
  <p>I tried everything but I'm going crazy!</p>
  
  <p><a href="http://bootstrap-datepicker.readthedocs.org/en/latest/i18n.html" rel="noreferrer">Bootstrap Datepicker i18n</a></p>
  
  <hr>
  
  <p>I changed the code in this way:</p>
  
  <pre><code>&lt;script src="vendors/bootstrap-datepicker/js/bootstrap-datepicker.js"&gt;&lt;/script&gt;
  &lt;script src="vendors/bootstrap-datepicker/js/locales/bootstrap-datepicker.it.js"&gt;&lt;/script&gt;
  
  
  &lt;script&gt;
      $(function() {
          $.datepicker.setDefaults( $.datepicker.regional["it"] );
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>but now the error is as follows:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'setDefaults' of undefined
  </code></pre>
  
  <hr>
  
  <p>With this fix:</p>
  
  <pre><code>$('.datepicker').datepicker({
      language: "it"
  });
  </code></pre>
  
  <p>I haven't got errors in console but the language is always english by default</p>