Forum
Hello I am using Xhanch Twitter plugin Versión 2.7.5
I need to change the language pluging in order to reflect the month, days names in spanish
Does it support it?
If someone can tell me how to change the Days name and Months days I really appreciate
had the same problem...
for a german translation you can try to change the following code:
no warranty but in my case it works. careful with updates!
---
replace:
$periods = array("Sekunde(n)", "Minute(n)", "Stunde(n)", "Tag(e)", "Woche(n)", "Monat(e)", "Jahr(e)", "decade");
with:
$periods = array("Sekunde", "Minute", "Stunde", "Tag", "Woche", "Monat", "Jahr", "decade");
$periodsN = array('Sekunden','Minuten','Stunden','Tagen','Wochen','Monaten','Jahren','decade');
---
replace:
if($now > $unix_date){
$difference = $now - $unix_date;
$tense = "vor";
}else{
$difference = $unix_date - $now;
$tense = "from now";
}
with:
if($now > $unix_date){
$difference = $now - $unix_date;
$tense = "vor %d %s";
}else{
$difference = $unix_date - $now;
$tense = "%d %s from now";
}
---
replace:
if($difference != 1)
$periods[$j].= " ";
$per = __($periods[$j], 'xmt');
with:
if($difference != 1){
$per=__($periodsN[$j],'xmt');
}else{
$per=__($periods[$j],'xmt');
}
---
replace:
return __($tense, 'xmt').' '.$difference.' '.$per;
with:
return sprintf(__($tense, 'xmt'),$difference,$per);
---