Need Help In this PHP Code

Discussion in 'PHP' started by petjelly, Feb 7, 2011.

  1. #1
    Hi,

    Please check the code below. I would appreciate if anybody can help me out with this code below.

    It is basically Google API for making my web page multilingual. I need to put the name of the country when the visitor selects the country to change the language using a dropdown menu.

    This is where I need to put the country name "Country Name Here"

    If the person clicks Germany.. The Country Name Here should change to Germany
    If the Person Clicks Spain The country name should change to Spain..
    Ofcourse the name should be in the same language.
    By Default it should be United Kingdom


    I am willing to pay if someone helps me out with this.

    Regards




    <? $languages = array('en','de','es','fr','it','nl');
     $countries = array('United Kingdom','Germany','Spain','France','Italy','Netherlands'); ?>
    <div  dojoType="dijit.form.DropDownButton" >
    <span id="cur">[B][COLOR="red"]Country Name Here[/COLOR][/B]</span>
    <div dojoType="dijit.TooltipDialog" >
    <table border="0" cellpadding="0" cellspacing="2" style="cursor:pointer;" >
    <?  foreach($languages as $key => $lang){?>
    <tr>	<td><img border="0" style="width:20px" style="cursor:pointer;" src="images/<?=$lang.'.'.png ; ?>" onclick="translateTo( '<?=$lang;?>')"/></td>
    <td style="cursor:pointer;">	<strong><?= $countries[$key]?></strong> 
    						                                                    </td>
     </tr> <tr> <td colspan="2"></td></tr>
    <?  }?>
    											
    </table>
    </div>
    </div>
    Code (markup):
     
    petjelly, Feb 7, 2011 IP