2013-11-09, 02:39:13
(2013-11-09, 02:25:11)moonspider Wrote: tried that, it didn't work at first. showed only pages in language #2, titles didn't change when I switched back to english, even though links lead to right pages within the current locale.
so i was thinking if there was a better way. like, grab language code directly from the page. and i made this tiny language indicator which i passed to your function:
PHP Code:$langind = null;
if ($language == 'lng1') {
$langind = 'lng1'; }
else {
$langind = 'lng2'; }
//and then what i posted above with the suggested change:
$sidelists = return_i18n_search_results('story', null, 0, 15, 'reverseurl', $langind);
//... and the rest
and now it works properly in every language, yay
i hope this code is alright?
Or much shorter:
Code:
$sidelists = return_i18n_search_results('story', null, 0, 15, 'reverseurl', $language);