You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

Translate Website

They have: 21 posts

Joined: Dec 2008

Please could someone explain to me the exact procedure to follow when it comes to translating websites in PHP. I have tried so many ways that none of them are working now.

I realize that this is not enough information but i am looking for a very details link that could explian this to me.

Thank you

fantastvik's picture

They have: 30 posts

Joined: Sep 2008

Do you mean translating the content into another language? {{links removed by moderators}} Please tell me about your problem in detail.

They have: 4 posts

Joined: Nov 2008

you know google provides a application to insert in your website to translate ?

They have: 21 posts

Joined: Dec 2008

<?
session_start();

//load the text that we require for the page.
if (isset($_SESSION['lang']) && $_SESSION['lang']!='') {
require_once("trans/".$_SESSION['lang'].$_SERVER['PHP_SELF']);
} else {
require_once("trans/en".$_SERVER['PHP_SELF']);
}
//set the language in a variable.
$l = ($_SESSION['lang']) ? $_SESSION['lang'] : "en";
?>

<? require_once("content.php"); ?>

Broadcrown 50Hz and 60Hz Generators

td img {display: block;}body {
background-image: url(images/background-modified2.jpg);
background-repeat: repeat-x;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i

.jpg','images/our-company_f2_<?=$l?>.jpg','images/products_f2_<?=$l?>.jpg','images/project_f2_<?=$l?>.jpg','images/information_f2_<?=$l?>.jpg','images/services_f2_<?=$l?>.jpg','images/contact_f2_<?=$l?>.jpg','images/onshore-power_f2_<?=$l?>.jpg','images/offshore-power_f2_<?=$l?>.jpg','images/gas-power_f2_<?=$l?>.jpg')">

<?=$menu?>

<?=$oil_submenu?>

 
 
 

 
<?=$lang['hdr'];?>
 

 

<?=$lang['par1'];?>
<?=$lang['par2'];?> pjhawar@broadcrown.co.uk
<?=$lang['par3'];?> nthompson@broadcrown.co.uk

 

 

 

 

 

The php Array:
<?
$lang = Array(

/* do not edit above this line */

"hdr" => "Oil and Gas",
"par1" => "This section is under construction and will be available very soon....",
"par2" => "Details on Onshore and Offshore Power may be obtained from"
"par3" => "Details on Gas Powered Generators may be obtained from"

);
?>

The URL is www.broadcrown.istl.com this is the testing enviroment.

NickD's picture

They have: 57 posts

Joined: May 2009

There doesnt seem to be alot of content there to translate, why not do it manually?