Vanesz

Last but not least...

Twitteren, Digg, Facebook etc..
Bookmark, whatever, you can...

Bookmark and Share


En anders ga je goedkoop op vakantie..
..via vakantieveiling.nl
Goedkoop op vakantie

Modifications to the "mod_autostand_search" module

To make the autostand search module work in a different language you have to change a few things to the module.

Translations/multi language

The base module has a great option to translate the language file but unfortunately these translations do not affect the modules. This is how I managed to make the search module multi language. I also changed the script a little bit to be able to translate the options in the select box presenting the 'Engine' options. To translate the module download the language file used by this module from the language directory (and this is pretty Joomla! default, so well done on this module).

Go to your Joomla! website and download "en-GB.mod_autostand_search.ini" from the English frontend language directory ('your website root' > language > en-GB) to your computer. Duplicate the downloaded language file and change the name of the duplicate to your desired language. In my case for Dutch it would be "nl-NL.mod_autostand_search.ini"

You will see the following;
And this is what is in it;

"en-GB.mod_autostand_search.ini"
 

"nl-NL.mod_autostand_search.ini"
Now you have two files. I also will show you how to make some changes to the module to make sure the 'fuel options' are translated as well. So first we prepare the language files for these changes. In the modified version there are some more translated words, so these language files have to represent these as well, of course. To make it easy, you can download the translated files here. Download them and change the file extensions to .ini instead of .txt (I renamed them to text files because otherwise there might occur some download issues).

Now upload these files back to your website to the according language directory ('your website root' > 'language' >'nl-Nl' for the Dutch language file and 'your website root' > 'language' >'en-GB' for the English translation file).

Other languages
If you want to use the module in other languages, simply donwload the English file and change it to your desired language. Change the filename corresponding to the desired language, change the text inside the file to your desired translation and the upload it to the corresponding language directory in the Joomla! frontend language directory on you website.

Changing the module

Modifying the language file to an other language then English won't change the "Fuel" options in the select list. To achieve the below you have to make some alterations to the script, but it is possible.


English

..changed to Dutch..

Somewhere below line 115 you find this piece of code.

Changing it to the code below makes it possible to also translate the 'Fuel options'.
The great advantage of this way of translating the module, rather then just changing the hard coded values is that the module, is now this also works in a multi language website.

Of course I could have made an updated module. But as it is an module which is a part of a payed solution I am not going to do that. But you can find the piece of code you have to modify here. You can copy it and replace the piece of code as shown above.

Discuss

You can discuss these modifications in this forum topic.

Nationale autoverzekering