MyT Community Forum
[Resolved] Wrong localisation for the datepicker - Printable Version

+- MyT Community Forum (https://forum.manageyourteam.net)
+-- Forum: Community Forum (https://forum.manageyourteam.net/Forum-Community-Forum)
+--- Forum: Bug Report (https://forum.manageyourteam.net/Forum-Bug-Report)
+--- Thread: [Resolved] Wrong localisation for the datepicker (/Thread-Resolved-Wrong-localisation-for-the-datepicker)



Wrong localisation for the datepicker - dboisvert - 07-22-2015

Hi,

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


RE: Wrong localisation for the datepicker - Francesco - 07-31-2015

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}));";