phplemon

phplemon blog rss feed Follow phplemon on Twitter Add To Your Technorati Favorites

 

Creating A New Language File For AdQuick


AdBrite Clone PHP Script - AdQuick

One of the new features in AdQuick is the ability to easily translate the entire AdQuick script into your own choice of language.

AdQuick uses language files, and i have made the English file available below for everyone to look at.

So by editing one file, this will translate the entire script.

The file in question can be found in your, include/lang folder. By default, there is only an English.php file in there, but if you wanted to create a new language, you should just duplicate that file and then rename it something like German.php or whatever your language is.

The file is made up on many lines like this,

$_lang[‘Browse_Websites’] = ‘Browse Websites';

So you would replace the phrase on the right, not the one inside the [ ], with the equivalent phrase in your choice of language.

Lets say you wanted to add a new phrase such as………..    Download This File    ……….. You would add a new line that would look like this,

$_lang[‘download_this_file’] = ‘Download This File';

Once you have added your phrases to your language file, you then need to add those new Language variables to your template files. For example, lets say you wanted to add some new text from the language file to your register.php page. You would need to edit the equivalent template file, which would be register.tpl (found in the templates/default) folder. In the .tpl file, you will see code, such as,

{$_lang.Browse_Websites}

This piece of code, tells the script to look in the language file, and to look for this variable, Browse_Websites

In the language file, this line will be found,

$_lang[‘Browse_Websites’] = ‘Browse Websites';

So once the script has found the, Browse_Websites variable in the language file, it will know to display the “Browse Websites” text on your webpage.

If anyone wants to translate this file for us, please get in contact, we would love to hear from you.

Download the language file, here.


About this post
:

Tags: , , , ,

Posted: November 29th, 2007 by Phil - Follow phplemon on Twitter