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="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$( function() {
$( "#datepicker" ).datepicker({dateFormat: 'dd/mm/yy'});
$( "#datepicker2" ).datepicker({dateFormat: 'dd/mm/yy'});
} );
</script>

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;
$.datepicker.regional[lang];