Need a bit of localisation help

We added a jQuery datepicker to a form on our site and it’s working great. But now trying to localise it to use the viewer’s browser language so it displays days in the correct language.

This is the script we used for the datepicker:

<script src=""></script>
<script src=""></script>
$( function() {
$( "#datepicker" ).datepicker({dateFormat: 'dd/mm/yy'});
$( "#datepicker2" ).datepicker({dateFormat: 'dd/mm/yy'});
} );

Just need a bit of help localising it, maybe with something like this, but not sure how to integrate the 2 snippets. Can you help please?

var lang = winwindow.navigator.language||window.navigator.userLanguage;