Including a script over HTTP is almost always the wrong thing. If you include a file using URL wrappers, the script will fetch the page using HTTP, which means it gets the processed output of the included page. If the included page printed a PHP script, this would probably work, but translator.php prints just HTML. translator.php needs to execute in the context of the including script so it has the right value for
$_SERVER['SCRIPT_URI']. If you include translator.php over HTTP,
$_SERVER['SCRIPT_URI'] will refer to translator.php, and you'll get a translator widget that will translate only translator.php.
If you want to include files relative to the document root, use
$_SERVER['DOCUMENT_ROOT'] (as recommended in the
previous discussion) or
virtual() instead of
include(). Note that
virtual() only works under Apache and incurs a slight performance hit as it requires a sub-request.
Don't put the includes folder in public_html; put it one level up, so it's a sibling of public_html.