SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation How do I traslate my website content to another language automatically?

    I want to know how to do automatic language translation for my site contents!

    I have a webiste content in English. I need language automatic language conversion to another foreign language.

    Here is an example:
    when you click on the language link on the left menu the entire page content is translated to that language and displayed. How to do this?

    http://en.wikipedia.org/wiki/Main_Page

    If there is any articles I can read on this please let me know. Thank you all.

  2. #2
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to retain a locale within a SESSION so your application is aware of which language to use, default to English if none is set.

    Once a user selects a language, set the locale for that language in a SESSION and refer to that from that point onwards. Another way is to look at the users ACCEPT_LANGAUGE,

    PHP Code:
    // ...
    explode(','getenv('HTTP_ACCEPT_LANGUAGE'); 
    And then set the SESSION variable based on this.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •