changed translate function and added into pages.php