Translating hardcoded DirectAdmin results


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » DirectAdmin » Skin

Translating hardcoded DirectAdmin resultsLast Modified: Jun 20, 2005, 11:17 am
Many of the result tables in DirectAdmin are hardcoded, meaning the text is set in the DirectAdmin binary and cannot be changed.

A trick to translate these hardcoded values would be as follows.

Find the html skin file which has the hardcoded token.  Lets say it contains

|TABLE_TOKEN|

Edit the file, to change that value to the following:

|$/usr/local/bin/php
<?php
$data = <<<END
|TABLE_TOKEN|
END;
$data = str_replace("englishtext", "newtext", $data);
$data = str_replace("englishtext2", "newtext2", $data);
echo  $data;
?>
DONE|

Where englishtext is what's currently hardcoded, and newtext is what you'd like it to be translated to.  You can add as many str_replace commands as you'd like, but note that this isn't very efficient, so too many of these commands could slow things down.

 
Related Helpfiles
Creating a language pack for DirectAdmin
How to customize one portion of a DA skin, without needing to create your own skin.

2003 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST