MyT Community Forum

Full Version: Wrong localisation for the datepicker
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

When installing version 1.4.0, with the French translation, the datepicker is in some Asian language.
Hi,

we are going to release the minor version 1.4.1 that fixes this problem.

However, you can fix it by editing the protected\extensions\datepicker\EJuiDatePicker.php file as follows:

PHP Code:
   if ($this->language != '' && $this->language != 'en') {
 
     $this->registerScriptFile($this->i18nScriptFile);
 
     $lang explode('_'$this->language);
 
     if (count($lang) === 1)
 
       $lang $lang[0];
 
     else
        $lang 
$lang[0] . '-' strtoupper($lang[1]);
 
     $js "jQuery('#{$id}').datepicker(jQuery.extend({showMonthAfterYear:false},jQuery.datepicker.regional['{$lang}'],{$options}));";