Localization means browser to display data in a different languages as per browser setting or manual setting inside the application. To implement jQuery UI Datepicker to display in different languages as per browser settings follow the steps:
var userLang = navigator.language || navigator.userLanguage;
options = $.extend(
// empty object
// your custom options
Let’s see the following figures how it is showing when the language change:
Output 1: When changing regional language as English using “en-US” in the following code:
Output 2: When changing regional language as Hindi using “hi” in the following code:
You can use regional language code as per your need from the following link : List of ISO 639-1 codes
- How to create slide left and right toggle effect using jQuery?
- How to create hidden form element on the fly using jQuery ?
- How to create a CSS rule or class at runtime using jQuery ?
- How to create To-Do List using jQuery?
- How to Create a Custom Image Magnifier using jQuery ?
- How to create responsive image gallery using HTML, CSS, jQuery and Bootstrap?
- Create a Tic-Tac-Toe Game using jQuery
- How to create followspot effect using HTML CSS and jQuery ?
- How to Create Link Tooltip Using CSS3 and jQuery ?
- How to create automatic pop-up using jQuery ?
- Create a Form Dynamically using Dform and jQuery
- jQuery | jQuery.fx.interval Property with example
- jQuery | jQuery.fx.off Property
- jQuery | jQuery.support Property
- jQuery | jquery Property
- jQuery | Create a div element
- How to create a div element in jQuery ?
- How to create a jQuery plugin with methods?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.