PDA

View Full Version : How to translate months?



Vitalii Nikitchuk
May 8, 2016, 10:08 PM
How to translate months?

Viktor
May 10, 2016, 11:52 AM
Hello Vitalii,

Where do you want to translate months? Would you please explain us better.

Vitalii Nikitchuk
May 10, 2016, 02:03 PM
in listing details
In the Russian version
May 10, 2016

Viktor
May 11, 2016, 04:42 AM
Hello Vitalii,

I have found 1 solution for it.

Go to ftp://includes>>classes>>rlCommon.class.php find method: adaptValue and line:


$out = date(str_replace(array('%', 'b'), array('', 'M'), RL_DATE_FORMAT), $d_timestamp);

and replace to:


if(RL_LANG_CODE == 'ru') {
$locale_time = setlocale (LC_TIME, 'ru_RU.UTF-8', 'Rus');

function strf_time ($format, $timestamp, $locale) {
$date_str = strftime($format, $timestamp);
if (strpos($locale, '1251') !== false){
return iconv('cp1251', 'utf-8', $date_str);
} else {
return $date_str;
}
}

$out = strf_time(RL_DATE_FORMAT, $d_timestamp, $locale_time);
} else {
$out = date(str_replace(array('%', 'b'), array('', 'M'), RL_DATE_FORMAT), $d_timestamp);
}


save and check again.

Vitalii Nikitchuk
May 11, 2016, 02:51 PM
No result. All do like you said

Viktor
May 12, 2016, 03:16 AM
Hello Vitalii,

If you want you can send ftp access to my PM and I will try to solve it.

Vitalii Nikitchuk
July 14, 2016, 05:36 PM
Thanks to the code works