title: Set the browser language in moment.js
body: <p>By using <code>moment.js</code> I need to set the date language.<br>
  <code>moment.lang('fr');</code> or <code>moment.lang('en');</code> works fine.    </p>
  
  <p>I would like to set it based on language preference of the desktop/browser.<br>
  How can I get this variable in javascript? </p>
  
  <p>P.S.</p>
  
  <p>navigator.language.slice(0,2) works fine with the english language, but I am looking for a better solution</p>
  
  <p>I am using jquery.</p>