Hi, I try to set german regional settings to igDatePicker (14.2) but I alway get en (Picture)
Here is my code.
<!-- =========================================
CSS
========================================== -->
<!--<link href="content/css/bootstrap.min.css" rel="stylesheet" />-->
<link href="content/css/bootstrap.css" rel="stylesheet" />
<link href="igniteui/css/themes/darkly/infragistics.theme.css" rel="stylesheet" />
<link href="igniteui/css/structure/infragistics.css" rel="stylesheet" />
<link href="content/css/visualit.css" rel="stylesheet" />
<!-- jQuery, jQuery Mobile and jQuery UI -->
<script src="scripts/modernizr.min.js"></script>
<script src="scripts/jquery-1.10.2.min.js"></script>
<script src="scripts/jquery-ui.min.js"></script>
<script src="igniteui/js/infragistics.core.js"></script>
<script src="igniteui/js/infragistics.lob.js"></script>
<script src="scripts/date.js"></script>
<!-- Dashboard core -->
<script src="content/scripts/config.js"></script>
<script src="content/scripts/app.js"></script>
All file paths are checked
$(document).ready(function () {
setCurrentPositions(true);
//#region get user language ***************************************
var userLang = window.navigator.userLanguage || window.navigator.language;
if (!userLang) {
userLang = navigator.userLanguage || navigator.language;
}
setLanguage(userLang);
//#endregion
$(function () {
var localesetting;
var regionalsetting = userLang;
switch (userLang.toLowerCase()) {
case "de-de":
localesetting = "de"
break;
//case "en-EN":
// break;
default:
localesetting = "en";
$("#datepicker").igDatePicker({
regional: regionalsetting,
locale: localesetting,
});
Thanks for your help.
This was helpfull.
Regards Manfred
Hello Mani,Please notice, in order to use the localization for igDatePicker, it is required to reference a jQuery localization file too. More details could be found at: Customizing the Localization of Ignite UI Controls – “Note: The igDatePicker depends on the jQuery UI Datepicker control, that's why it also requires jquery.ui.datepicker-*.js localization file which can be found in the jQuery UI redistributable package on their web site here ”The required file for German is datepicker-de.js. You could copy the file locally and reference it. Please let me know if you require further assistance regarding this matter.
Additional resources:http://help.infragistics.com/jQuery/2014.2/ui.igdatepicker#options:regionalhttp://help.infragistics.com/jQuery/2014.2/ui.igdatepicker#options:locale