Current time: 05-24-2012, 08:39 AM Hello There, Guest! (LoginRegister)

Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Language Plugin
12-23-2008, 09:19 AM (This post was last modified: 12-23-2008 10:31 AM by alfaleader.)
Post: #1
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

Installation:
- 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
example:
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")
Find all posts by this user
12-25-2008, 01:21 PM (This post was last modified: 12-25-2008 01:23 PM by Jimmie.)
Post: #2
RE: Multiple Language Plugin
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
Visit this user's website Find all posts by this user
12-25-2008, 01:25 PM
Post: #3
RE: Multiple Language Plugin
Portuguese Translation Avaliable
I just translated it to Portuguese. A few things weren't translated, my lazyness. Will do that next release. Tongue

Download here:
.zip  portuguese.zip (Size: 2.1 KB / Downloads: 305)

Jimmie Lin - Community Manager & THT.Next Developer
Visit this user's website Find all posts by this user
12-30-2008, 03:38 PM
Post: #4
RE: Multiple Language Plugin
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.
Find all posts by this user
01-03-2009, 09:39 AM
Post: #5
RE: Multiple Language Plugin
I decided to make a v0.2 version of this script, which will include:
-language editor/creator implented
-full translation!
Find all posts by this user
01-04-2009, 03:13 AM (This post was last modified: 01-04-2009 03:16 AM by adi003.)
Post: #6
RE: Multiple Language Plugin
i'm waiting for this one. then i will translate it to french and romanian
Find all posts by this user
01-05-2009, 02:44 PM
Post: #7
RE: Multiple Language Plugin
Lol, now I have to hurry!
Find all posts by this user
05-25-2009, 09:08 PM
Post: #8
RE: Multiple Language Plugin
Thanks for posting this might be useful in the past Wink.

Find all posts by this user
08-22-2009, 06:37 PM
Post: #9
RE: Multiple Language Plugin
oh no, download is dowm
Find all posts by this user
08-22-2009, 11:28 PM
Post: #10
RE: Multiple Language Plugin
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
Visit this user's website Find all posts by this user
Thread Closed 


Forum Jump:


User(s) browsing this thread: 5 Guest(s)