Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Language Plugin
What it does:
Before the script displays all the data, the translation plugin checks if there is text that stands in $original[x] and if it finds this text, it replaces it with the translation in $replacement[x]
==> So it translates the script!

Here is the plugin for multiple languages:
link for 1.01
link for 1.1

- extract this zip file to your THT folder, overwrite the files who are double.
- add this to your database:
PHP Code:
INSERT INTO `<PRE>config` (`name`, `value`) VALUES ('language''english'); 
where <PRE> mostly stands for tht_ or something else that you have submitted in the installation
-select your language in the admin control panel (global configuration ->language )

if you want to make your own translation, do this
- 'includes/language.php'
PHP Code:
... //here is some code
$original[0] = 'Step One - Choose Hosting'; //order forms start
$original[1] = 'Domain/Subdomain:';
... // here also some code

-You have to make a folder with the name of your language in includes/language , for example include/language/dutch
Make here the file translation.php, in translation.php has to stand the translation of the $original
PHP Code:
$replacement[0] = 'Stap 1 - Hosting Selecteren'; // Step One - Choose Hosting translated
$replacement[1] = 'Domein/Subdomein:'; // Domain/Subdomain translated

If you want to translate more things, just copy the english text and paste it in
PHP Code:
$original[x] = 'paste here'// x is a number 
and make the translation in
PHP Code:
$replacement[x] = 'translation'

Watch out if there stands <br> or something else, leave this! Else the text won't be good translated! (if it has to translate "hello my name is alfaleader" and it translates 'hello' to 'hallo' , but after this it searches for "hello my name is alfaleader" and it doesn't find this because it's already changed to "hallo my name is alfaleader")
Oh Yes. You can't search for "THT" because its your installation name. I'm refering to this:
PHP Code:
$original[13] = 'Do you agree to the THT Terms of Service?'
"THT" is the Hosting Service's name. Better remove it and split it up to two strings. If I change my THT Installation's name, it would break.

Also, this is a typo.
PHP Code:
$original[86] = 'Your Paswoord:'

But its a great plugin, thanks Wink
Jimmie Lin - Community Manager & THT.Next Developer
Portuguese Translation Avaliable
I just translated it to Portuguese. A few things weren't translated, my lazyness. Will do that next release. :p

Download here:
.zip (Size: 2.1 KB / Downloads: 936)
Jimmie Lin - Community Manager & THT.Next Developer
Thanks. I maybe will make an excel file with al the things to translate that automates the numbers so you can easy put more things to translate.
I decided to make a v0.2 version of this script, which will include:
-language editor/creator implented
-full translation!
i'm waiting for this one. then i will translate it to french and romanian
Lol, now I have to hurry!
Thanks for posting this might be useful in the past Wink.
oh no, download is dowm
Just to let you guys know we might add this (or some kind of modified version) to CORE in a future release! Wink
Kevin Mark - TheHostingTool Lead Developer

Forum Jump:

Users browsing this thread: 1 Guest(s)