Works great except the select category does not work. Always displays all blog posts instead of the selected category.
]]>Hi, I had the problem of having a wp installation in only one language (and want to keep it) but with multisite mode, to make a multi-language site. Since the plugin translates based on the installation lang, that didn’t do the job for me. So I found a solution (only for php programmers).
in eg-archives.php (plugin folder), do these changes:
in $EG_ARCHIVE_FIELDS add a new option like this:
‘language’=> array( ‘type’ => ‘select’, ‘label’ => ‘Lingua’,
‘list’ => array(‘it’ => ‘IT’,
‘en’ => ‘EN’,
‘fr’ => ‘FR’,
‘de’ => ‘DE’)),
then somewhere add an array with your own translations like this:
$loc_months = array(
‘IT’ => array(‘Gennaio’,’Febbraio’,’Marzo’,’Aprile’,’Maggio’,’Giugno’,’Luglio’,’Agosto’,’Settembre’,’Ottobre’,’Novembre’,’Dicembre’),
‘EN’ => array(‘January’,’February’,’March’,’April’,’May’,’June’,’July’,’August’,’September’,’October’,’November’,’December’),
‘FR’ => array(‘Janvier’,’ Février’,’Mars’,’ Avril’,’Mai’,’Juin’,’Juillet’,’Ao?t ‘,’Septembre’,’Octobre’,’ Novembre’,’ Décembre’),
‘DE’ => array(‘J?nner’,’Februar’,’M?rz’,’April’,’Mai’,’Juni’,’Juli’,’August’,’September’,’Oktober’,’November’,’Dezember’),
);
Then, in eg_get_archives(), on the right place (around line 110, depends on options), do something like this:
$text = sprintf(__(‘%1$s %2$d’), $loc_months[strtoupper($language)][$arcresult->month-1], $arcresult->year);
——
Sorry I can’t do more examples, do not have much time, but if you’re a php programmer I’m sure that as soon as you take a look to the eg-archives.php file you’ll be able to rapidly understand my notes.
——
Basically, my mod (for now only for mixed month mode and with post count (but it’s enough to duplicate the relavant row with some minimal changes to have all the options ok)), what is done is:
– add a language option in admin widget panel
– add manually an array with whatever traslations you want
– use that array and not the global wp lang settings to make the month translations.
——
Hope it helps!
]]>Hello.
I am using EG-archives widget to show a list of my posttitles in the sidebar.
I want to limit the widget to only show the posts in the “news” category (id=”1″)
How can I do this?
Thanks
Bob
]]>