Search engines and website translation script

4 replies
I have just finished a script which automatically translates pages to any desired language via a text file using php.
Then it occured to me, can the Search engines find these pages and their contents.

Basically when the person visits the site, the script looks to see if theres a cookie already placed or a PHP variable, if not then it sets these to the default (English) then includes the text strings in the HTML tags using PHP from the "english" translation file.

If somebody chooses a new language then the variable and cookie are updated and the new language is displayed with the text from the specific translation file.
The cookie is only for remembering the persons previous preference.

My big worry as I have limited knowledge of the Search Engine bots is, will they find the contents to the website and will they find every language text to list in the relevant search engine of that country.

As I have already done a campaign and this site is already No1 in the Greek google search engine for many keywords I dont want to lose this placing by testing the script.

Does anybody have any ideas?
#engines #script #search #translation #website
  • Profile picture of the author MemberWing
    Translation version of site pages are pretty efficient way to gain more visibility worldwide and hence higher ranking.

    You may even detect first time visitor's language automatically by examining $_SERVER['HTTP_USER_AGENT']

    For example:
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.65 Safari/525.19

    -- say US/english via "en-US" part of it. Other language users have different settings.

    Gleb
    {{ DiscussionBoard.errors[889274].message }}
  • Profile picture of the author altecl46
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[890147].message }}
    • Profile picture of the author robdraw
      Altec: Im not asking for a transaltion service
      MemberWing: Thanks I am aware of this, and it will be incorperated later.

      But for now my burning question is :

      Does anybody know for sure thatl Search Engine bots find the contents to the website and will they find every language text to list in the relevant search engine of that country.

      In the way I have described above.

      Please answer if you can help
      {{ DiscussionBoard.errors[890201].message }}
      • Profile picture of the author CMartin
        Originally Posted by robdraw View Post

        I have just finished a script which automatically translates pages to any desired language via a text file using php.
        Cool

        Then it occured to me, can the Search engines find these pages and their contents. Basically when the person visits the site, the script looks to see if theres a cookie already placed or a PHP variable, if not then it sets these to the default (English) then includes the text strings in the HTML tags using PHP from the "english" translation file.

        If somebody chooses a new language then the variable and cookie are updated and the new language is displayed with the text from the specific translation file.
        The cookie is only for remembering the persons previous preference.
        If I understood correctly, you just reload the page (same URL) with the selected translation - if that's the case then the search engines robots will not find the additional translations, unless you have links for each translation and for *DIFFERENT* URLs.

        My big worry as I have limited knowledge of the Search Engine bots is, will they find the contents to the website and will they find every language text to list in the relevant search engine of that country.

        As I have already done a campaign and this site is already No1 in the Greek google search engine for many keywords I dont want to lose this placing by testing the script.

        Does anybody have any ideas?
        I would use a different approach for this, as it can give you best results. I would create a folder for each language - for example:
        - domain.com/en/ - for English
        - domain.com/fr/ - for French
        - ...and so on
        And I would use some ID for each article or other process to identify each article. Then I would have links in each page for the respective translations. For example:
        domain.com/en/article1.php would have links like:
        - French: domain.com/fr/article1.php
        - Italian: domain.com/it/aricle1.php
        - ...and so on

        Don't forget to use the correct language meta tag in each page - it helps search engines to identify the language

        Something important to remember: search engines robots find pages by following links. So, you must have hard-coded the links for each page/translation somewhere. Using for example a javascript drop-down menu for language selection does not give you any guarantee that robots will check the javascript to find links and follow them.

        Something that can also help is to generate the sitemaps file for the search engines.

        Carlos
        {{ DiscussionBoard.errors[890328].message }}
        • Profile picture of the author robdraw
          Hi Carlos,
          Good idea, and thank you, you helped me overcome the problem.

          I tested the script with a online service which checks what the Search engines see, and by default the only page picked up is the default, with correct text and metatags contained in the strings, (probably as the default language is set first and the correspondning strings are sent for this request). When I change the default language again the bot gets the info correctly but for the new language, So I guess at least one language is good with the current structure and depending on the default.

          So now with your logic all I need to do is copy the files as they are and put them in their respective directorys, with their language text file which is not a big hardship, at least not as big as creating new pages from scratch every time I add a new language to the site. or need to update the page structures.
          {{ DiscussionBoard.errors[890383].message }}

Trending Topics