Ok, so this is a small hack I have crafted to manage Multilanguage websites for system pages.
This tutorial will help you have a multilanguage site for a SEARCH RESULT PAGE.
the first thing we need to do is to have access to our database, so grab whatever favourite database explorer for mysql you can find. In my case i'm going to be using navicat mysql.
first things first, head over to the table jos_system_gridbox_pages and take a look at the record with id = 3.
Copy this record and paste a new record. you'll notice the ID changes (depending on your database explorer you might need to change the ID manually.
Do this manually for each language that you are using. In my case I am using Spanish + ENGLISH, so you can see i now have two different system pages with two different languages. one for spanish and one for english... pretty easy up to here, right?
Ok, now I want you guys to head over to the joomla system pages editor and you'll be seeing 2 different system pages.
You can edit both differently, one in english and one in Spanish.
Now quickly head to the file manager of your choice and browse around your joomla code tree until you get to components / com_gridbox / views / search / view.html.php
Take a look at the code that you have there and change it to the way you see here
In my case, i have 2 languages so the code snippet is you can see, one for english and one for spanish. The numbers 3 and 5 correspond to the ID of the search pages in the jos_gridbox_system_pages (or whatever the table in your system is with the correct prefixes like alskja_gridxbox_system_pages or whatever ).
the display function that must remain is this one
public function display($tpl = null)
{
$language = JFactory::getLanguage()->getTag();
if ($language == 'es-ES') $gotoId = 3;
else $gotoId = 5;
$this->item = gridboxHelper::getSystemParams($gotoId);
$this->item->html = gridboxHelper::checkModules($this->item->html, $this->item->items);
$this->prepareDocument();
parent::display($tpl);
}
so, in your code , you must edit the following lines:
if ($language == 'es-ES') $gotoId = 3;
else $gotoId = 5;
so that it matches your language and -> database entries as we previously talked before. The tag es-ES is whatever language tag your system is using. (in my case I use en-GB and es-ES, but you could use many more)
pretty simple, the results are as you see:
depending on the language, the system will display search results on one ID or another.
i hope this is useful for all of you out there.