Page 1 of 3 123 LastLast
Results 1 to 10 of 29
Like Tree1Likes

Thread: Translation Script Documentation

  1. #1
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,034
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts

    Translation Script Documentation

    This tool was originally authored by Interlogic, and has been improved by DCT, f3ze, Sameer, myself, and Eric Schneider.

    This tool enables you to automatically and transparently translate your web site using either Google Translate or Yahoo Babelfish.

    Google Translate currently supports the following destination languages:

    • Arabic
    • Bulgarian
    • Catalan
    • Chinese - Simplified
    • Chinese - Traditional
    • Croatian
    • Czech
    • Danish
    • Dutch
    • English
    • Filipino
    • Finnish
    • French
    • German
    • Greek
    • Hebrew
    • Hindi
    • Indonesian
    • Italian
    • Japanese
    • Korean
    • Latvian
    • Lithuanian
    • Norwegian
    • Polish
    • Portuguese
    • Romanian
    • Russian
    • Serbian
    • Slovak
    • Slovenian
    • Spanish
    • Swedish
    • Ukrainian
    • Vietnamese

    Yahoo Babelfish currently supports the following destination languages:

    • Chinese - Simplified
    • Chinese - Traditional
    • Dutch
    • French
    • German
    • Greek
    • Italian
    • Japanese
    • Korean
    • Portuguese
    • Russian
    • Spanish

    Requirements

    • Apache (1.3 or 2.x)
    • Apache mod_rewrite
    • PHP cURL support
    • PHP safe_mode disabled

    Necessary Files

    The files necessary to make this script run are usually stored in the /translate/ directory of your web site. These files are:

    • .htaccess
    • index.php
    • translate.php
    • tr_config.php
    • tr_log.php

    Example Files

    The example files are usually stored in the /includes/ directory of your web site. These files are:

    • flags-google.shtml
    • flags-yahoo.shtml

    flags-google.shtml is a sample include file which calls the Google Translate engine.

    flags-yahoo.shtml is a sample include file which calls the Yahoo Babelfish engine.

    Graphics


    The script comes with an assortment of flag graphics. You can use these flags, replace these flags, or even use plain text links instead of these graphics.

    A complete set of national flags is available in translate/graphics/.

    A set of flags provided with older implementations of this script is available in translate/graphics-old/.

    Utilities


    • report.sh

    report.sh

    report.sh is a little script that counts the number of files in your cache for each language. The output looks like this:
    Google:

    Arabic: 1765
    German: 1723
    Spanish: 1743
    French: 1724
    Italian: 1722
    Japanese: 1723
    Korean: 1721
    Portuguese: 1726
    Russian: 1696
    Chinese Simplified: 1730
    Chinese Traditional: 1699

    Yahoo:

    German: 1716
    Spanish: 1710
    French: 1709
    Italian: 1715
    Japanese: 1712
    Korean: 1713
    Portuguese: 1727
    Russian: 1726
    Chinese Simplified: 1720
    Chinese Traditional: 1722
    Dutch: 1736
    Greek: 1707
    report.sh expects all of your files to have the .html extension. If your files have another extension, you may have to edit the script.

    Installation of the Script

    Unzip the translation script into the DocumentRoot of your Apache virtual host

    This will create these directories:

    • /lang
    • /ylang
    • /translate

    The lang and ylang directories will contain only one file each, .htaccess.

    The translate directory will contain these files:

    • .htaccess
    • index.php
    • translate.php
    • tr_config.php
    • tr_log.php
    • report.sh
    • readme.html

    The translate directory will also contain these directories:

    • g
    • y
    • graphics
    • graphics-old
    • includes


    Ensure that the permissions of the /translate/g directory are drwxrwxrwx (`chmod 777 g`)

    Ensure that the permissions of the /translate/y directory are drwxrwxrwx (`chmod 777 g`)

    Edit translate/tr_config.php so that site_url is set to the URL of your web site.

    Paste the contents of translate/includes/flags-google.shtml or translate/includes into your web page(s).

    Configuration of the Script


    The purpose of script configuration is to limit load on Yahoo and Google's translation engines, while at the same time providing visitors with the translations of your valuable content.

    • In translate/tr_config.php, set your translator_cache_days on line six to the number of days that you want a cache file to be considered "current."
    • In translate/.htaccess, configure any directories which you do not want to be translated.
    • In translate/.htaccess, configure any file extensions which you do not want to be translated.
    Last edited by Will.Spencer; 30 April, 2009 at 20:33 PM.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  2. Thanked by:

    lokoman (21 August, 2014)

  3. #2
    Momo is offline Unknown Net Builder
    Join Date
    Sep 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry noob question and how to implemented?is it need php script or else? like
    Code:
    <?php include blablabla ?>

  4. #3
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,034
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    Quote Originally Posted by Momo View Post
    Sorry noob question and how to implemented?is it need php script or else? like
    Code:
    <?php include blablabla ?>
    The way I implement it can be seen in the example file "flags-google.shtml".

    The implementation is really dependent upon how your web site is built.

    Are your pages HTML, SHTML, PHP, etc...
    emoetria likes this.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  5. #4
    Dom
    Dom is offline Unknown Net Builder
    Join Date
    Sep 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Querystring documentation

    Hi Will,

    Thanks for your documentation, unfortunatley I can't find any information on what to do if the page url has a querystring in it.

    so this url is wrongly translated for instance

    When we come to translating the url the querystring is stripped off. Am I doing something wrong?

    Thanks

    Dom

  6. #5
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,034
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    A new release of the translator is due next week which fixes many squirrelly bugs.

    I just spoke to the developer and he says this should work fine in the new release.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  7. #6
    Dom
    Dom is offline Unknown Net Builder
    Join Date
    Sep 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Brilliant

    I will be sure to install it!

    Thanks for all your help!

    Dom

  8. #7
    iluxa22 is offline Unknown Net Builder
    Join Date
    Oct 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It don't work just refreshes the page any ideas?

    the site I'm trying implement this is VitaminCA

  9. #8
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,034
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    Quote Originally Posted by iluxa22 View Post
    It don't work just refreshes the page any ideas?
    I'd start with Translation Script Troubleshooting Tips and then move on to Posting Trouble Reports (if necessary).

    Quote Originally Posted by iluxa22 View Post
    the site I'm trying implement this is VitaminCA
    I haven't seen an error like this before:
    Code:
    Warning: Cannot modify header information - headers already sent by (output started at /homepages/24/d216192551/htdocs/store.vitaminca-old/header.php:4) in /homepages/24/d216192551/htdocs/store.vitaminca-old/classes/Cookie.php on line 252
    What CMS is that site running?
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  10. #9
    iluxa22 is offline Unknown Net Builder
    Join Date
    Oct 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Prestashop ... . i just put the code in the index.php not the header ..... uhhhh please help me!


    Thank you for your support Will!!!

  11. #10
    iluxa22 is offline Unknown Net Builder
    Join Date
    Oct 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ;however if i use Google translate from the source it works....

    ???

Page 1 of 3 123 LastLast

Similar Threads

  1. Translation Script v.2009-09-23
    By Will.Spencer in forum Translation Script Support
    Replies: 14
    Last Post: 2 January, 2011, 08:43 AM
  2. Translation Script Error 503
    By ytutun in forum Translation Script Support
    Replies: 4
    Last Post: 3 October, 2010, 23:07 PM
  3. Translation script not working
    By jagman in forum Translation Script Support
    Replies: 1
    Last Post: 5 September, 2009, 07:40 AM
  4. Translation Script Version 2.15
    By Will.Spencer in forum Translation Script Support
    Replies: 9
    Last Post: 15 April, 2009, 10:15 AM
  5. Need help with this Translation Script!
    By coder77 in forum Translation Script Support
    Replies: 1
    Last Post: 26 February, 2009, 21:05 PM

Tags for this Thread

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
  •