Translating hardcoded DirectAdmin results [DirectAdmin]

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.