Translating

The Ventrino Traffic Exchange Script comes in English only but is easy to translate into any language.  Some of the languages already in use include:-

And quite possibly many more that we do not know about!  This is because the process is straight forward.  There are two tasks you need to do.  First translate the system messages which are all stored in a single language file, after that edit the templates where images and non system based text needs to be translated.  As templates are really a separate task it is not covered here in detail, for that please click here.

The Language File

The language file is located in your active templates folder in the lang directory.  On a typical system that used standard templates the full path and file is as follows:-

[root]/templates/standard/lang/language.inc.php

This is a PHP file containing constants that can be edited with the new language definitions.  For example, if you wanted to translate the daily sponsor text from English to French you would locate this section of the file:-

Translate English Text

Would be changed to something like this:-

Translated into French

Traffic Exchange Script Templates LocationEditing The Templates

For detailed information on editing templates click here.  Teh rest of this article deals with modifying text, however some images contain English text and either you or your web designer will need to translate these using your favourite design programs.

 

Template files are located in your active templates folder in the inv directory.  A typical system uses standard as the folder for the templates, in this case you will see a sub folder called inv, in this folder you will find the main templates files

[root]/templates/standard/inv/*

Two other files that control the overall layout do not contain any visible text but you may wish to modify meta information, these are:-

[root]/templates/standard/inside.tpl
[root]/templates/standard/outside.tpl

Download everything required for translation in a single file

You can download everything needed to translate in a single language zip file from here

Converting Content-Type

There are two issues you need to address if you wish to convert the Content-Type for any PHP application.  Meta tags and the header information sent by PHP.  While PHP is a master in practically every web application situation it has failed to conquer it's control of languages, even the built in gettext has serious flaws so the only two sure ways of handling this is to do it yourself.  Here's what you do:-

1.  Using a search and replace tool such as InfoRapid replace the current meta tags Content-Type with the one you wish to use.  For example search for:-

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

and replace with your own which maybe:-

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

2.  Now set the PHP header making sure you use the same code.  To do this open mysql_config.php and add the following lines:-

<?php

$charset = 'ISO-8859-1';
header("Content-Type: text/html; charset=$charset");

// rest of mysql_config.php code here


?>

Changing iso-8859-1 for the Content-Type you wish to use.

Conclusion

Prior to the production of the owners manual private arrangements between forum members to share translations has been common.  If you would like to share your translation and receive credit please contact us by clicking here and let's discuss it :)

 

Home Forum Client Area