Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
how do i change language of dates?
Hi, I have a Russian version of Vanilla. It is all in Russian, except some little phrases/words. The question is, how do i translate the following into russian:
1. dates; (eg. change Oct 5th to Окт 5)
2. in the extended search, the word "simple" to "проÑтой"
i think that's all, but im not sure yet...
thanks in advance
1. dates; (eg. change Oct 5th to Окт 5)
2. in the extended search, the word "simple" to "проÑтой"
i think that's all, but im not sure yet...
thanks in advance
0
This discussion has been closed.
Comments
OldPostDateFormatCode
. It'll probably say'M jS Y'
, change that to'j M Y'
. If you want some other formatting, check out the documentation for php's date() function.As for the simple thing, it seems like that has been left out of the Russian translation, in the same definitions.php file, add this:
$Context->Dictionary['Simple'] = 'проÑтой';
return date($Context->GetDefinition('OldPostDateFormatCode'), $Time);
in the TimeDiff function (file library/Framework/Framework.Functions.php) withreturn str_replace( array('Jan', 'Feb', etc...), array('russian equivelent of jan', 'of feb', etc...), date($Context->GetDefinition('OldPostDateFormatCode'), $Time) );
i have also updated the Russian (with extensions) add-on (my only add-on
thanks again
1) Add
setlocale(LC_ALL, 'pt_PT.UTF-8@UTF-8'); //change pt_PT to your language
at the top of file
languages/yourlanguage/definitions.php
2) Change in that file
$Context->Dictionary['OldPostDateFormatCode'] = 'M jS Y';
to
$Context->Dictionary['OldPostDateFormatCode'] = '%e %B %G'; // see the formatting here http://de.php.net/manual/en/function.strftime.php
2) Replace the line (near line 810)
return date($Context->GetDefinition('OldPostDateFormatCode'), $Time);
with
return strftime($Context->GetDefinition('OldPostDateFormatCode'), $Time);
That's it.