Translating hardcoded DirectAdmin results

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.

 
skins/hardcod.txt · Last modified: 2010/02/20 20:56 by muscardin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Please visit Automatic Backlinks to start earning free backlinks Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki