title: jquery.ui datepicker localization - switching between languages
body: <pre><code>jQuery(document).ready(function ($) {
  
      $.datepicker.setDefaults($.datepicker.regional[""]);
      var lng = $(".language").text().substr(0, 2);
      $("#dtFrom").datepicker({ dateFormat: 'mm-dd-yy' },
      $.datepicker.regional[lng]
    );
      $("#dtTo").datepicker({ dateFormat: 'mm-dd-yy' },
      $.datepicker.regional[lng]
    );
  });
  </code></pre>
  
  <p>My issue: as the code is above, if 'lng' equals 'fr' my datepicker is still english, if I comment out the first line ($.datepicker.setDefaults($.datepicker.regional[""]);) my datepicker always renders french (regardless of the value of 'lng').  Figure I'm missing something simple.  Any ideas how to get this datepicker to render it's contents in the proper language (french or english based on the value of 'lng')?</p>