1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Multi language Website

Discussion in 'PHP' started by myharshdesigner, Sep 22, 2007.

  1. webrickco

    webrickco Active Member

    Messages:
    268
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #21
    Translating with Google or any other tool, would be a good idea if it worked. Unfortunatly, automatic translation is not accurate at all, even for a single word.

    The translation needs to be done in the context and meaning of your site content, which means it has to adapt. No public translator, has the power to do that.

    I take for example a site about IT in which the word Toolbar has a very specific meaning, proper to IT area.

    With Google, it doesn't even translate
    French
    Toolbar (should be "boîte à outil" and even if it worked, it would have most probably translated to "Barre d'outil" which is not accurate in the context)

    Portuguese
    Toolbar (same remark applies, shoud be "barra de ferramentas").

    I believe the best you can do, if you want people to understand what you mean is to make XML files with translated content of your site.
     
    webrickco, Sep 24, 2007 IP
  2. ziya

    ziya Well-Known Member

    Messages:
    1,971
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    140
    #22
    Have you solved your problem ? Did google translater help you ? or maybe you still want to have your own translater..
    create file lang_eng.php:

    <?
    $lang['January'] = "January";
    $lang['February'] = "February";
    $lang['March'] = "March";
    $lang['April'] = "April";
    $lang['May'] = "May";
    $lang['June'] = "June";
    $lang['July'] = "July";
    $lang['August'] = "August";
    $lang['September'] = "September";
    $lang['October'] = "October";
    $lang['November'] = "November";
    $lang['December'] = "December";

    $lang['Name'] = 'Name';
    $lang['Message'] = 'Message';
    $lang['Subject'] = 'Subject';
    $lang['Date'] = 'Date';
    $lang['Time'] = 'Time';
    $lang['Comment'] = 'Comment';
    $lang['Category'] = 'Category';
    $lang['Categories'] = 'Categories';
    $lang['Email_Add'] = 'Email Address';
    $lang['Email'] = 'Email';
    $lang['Home_Page'] = 'Home Page';
    $lang['Home'] = 'Home';
    $lang['Password'] = 'Password';
    $lang['Search'] = 'Search';
    $lang['Reenter_password'] = 'Reenter Password';
    $lang['Edit'] = 'Edit';
    $lang['Del'] = 'Delete';
    $lang['Error'] = "Error";
    $lang['Notice'] = "Notice "; // $lang['Msg_no_mth'] = "Month Not Selected";
    $lang['Msg_no_date'] = "Date Not Selected";
    $lang['Msg_no_cat'] = "Category Not Selected";
    $lang['Msg_Del_error3'] = "Warning : Do you want to delete ?";
    $lang['Yes'] = "Yes";
    ...
    you can add your labels here like those
    ...


    ?>
     
    ziya, Sep 30, 2007 IP
    webrickco likes this.
  3. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #23
    If you must do it that way, at least make it reasonably pretty :p

    $lang = array(
    
    'January'     => 'January',
    'February'    => 'February',
    'March'       => 'March',
    
    );
    PHP:
     
    krt, Oct 1, 2007 IP
  4. vsingh69

    vsingh69 Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #24
    see begoodbe.com for a simple script
     
    vsingh69, Oct 30, 2007 IP