Problem with Gtranslate PRO

Popular automatic website translation tool

Problem with Gtranslate PRO

Postby Rextimort » Tue Sep 13, 2011 3:33 am

Hello,

I have just installed GTranslate PRO on my webpage and server. I followed all the steps one by one. First found that met all the requirements.

I tested the GTranslator normal and goes fine (with "On FLy (jQuery)").

Then i tried to use the GT PRO on my webpage with redirect. I modify my .htaccess to:

Options All -Indexes
RewriteEngine on
# gtranslate config
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]
RewriteCond %{HTTP_HOST} ^kiwarriors\.net$ [NC]
RewriteRule ^(.*)$ http://www.kiwarriors.net/$1 [R=301,L]

Actually i have a browser game in the domain: http://www.kiwarriors.net and i am using other translator engine. I want begin to use GT PRO, so i am testing on a test script called: test_translate.php

In other words: http://www.kiwarriors.net/test_translate.php

But when i click on the flags the script redirects to (for example): http://www.kiwarriors.net/en/test_translate.php but nothing happens.

In my google API console the Character Count is increasing, like you can see in the next screen:

Image

I don´t know what is going wrong.

Also i have integrated the GT PRO in this webpage http://www.kiwarriors.net/index_pruebas.php and when i click on any flag i go to http://www.kiwarriors.net/XX/index_pruebas.php and nothing happens too. Also, when http://www.kiwarriors.net/XX/index_pruebas.php is loaded, part of the header is lost, i don´t know why.

Please, help me.
Best regards.
G

PD: Sorry for my bad english
Rextimort
 
Posts: 3
Joined: Tue Sep 13, 2011 3:08 am

Re: Problem with Gtranslate PRO

Postby Rextimort » Tue Sep 13, 2011 3:39 am

This is the end of the debug.txt:
.....
.....

< HTTP/1.1 404 Not Found

< Date: Mon, 12 Sep 2011 23:36:55 GMT

< Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

< Content-Length: 521

< Content-Type: text/html; charset=iso-8859-1

<

* Connection #0 to host http://www.kiwarriors.net left intact
* Closing connection #0
* About to connect() to http://www.googleapis.com port 443 (#0)
* Trying 74.125.65.95... * connected
* Connected to http://www.googleapis.com (74.125.65.95) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* SSL connection using RC4-SHA
* Server certificate:
* subject: C=US; ST=California; L=Mountain View; O=Google Inc; CN=*.googleapis.com
* start date: 2011-08-12 03:49:13 GMT
* expire date: 2012-08-12 03:59:13 GMT
* subjectAltName: http://www.googleapis.com matched
* issuer: C=US; O=Google Inc; CN=Google Internet Authority
* SSL certificate verify ok.
> POST /language/translate/v2 HTTP/1.1

Host: http://www.googleapis.com

Accept: */*

X-HTTP-Method-Override: GET

Content-Length: 90

Content-Type: application/x-www-form-urlencoded



< HTTP/1.1 400 Bad Request

< Content-Type: application/json; charset=UTF-8

< Date: Mon, 12 Sep 2011 23:36:56 GMT

< Expires: Mon, 12 Sep 2011 23:36:56 GMT

< Cache-Control: private, max-age=0

< X-Content-Type-Options: nosniff

< X-Frame-Options: SAMEORIGIN

< X-XSS-Protection: 1; mode=block

< Server: GSE

< Transfer-Encoding: chunked

<

* Connection #0 to host http://www.googleapis.com left intact
* Closing connection #0
Request: key=MY API KEY&q=404+Not+Found&userip=87.223.166.18&target=js

Response: {
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Invalid Value"
}
],
"code": 400,
"message": "Invalid Value"
}
}
Rextimort
 
Posts: 3
Joined: Tue Sep 13, 2011 3:08 am

Re: Problem with Gtranslate PRO

Postby Rextimort » Tue Sep 13, 2011 3:49 am

Also i have a 2 letter directory called "js".

Regards.
G
Rextimort
 
Posts: 3
Joined: Tue Sep 13, 2011 3:08 am

Re: Problem with Gtranslate PRO

Postby Edvard » Tue Sep 13, 2011 4:18 pm

You need to configure it and add your API key in gtranslate/config.php file. Currently you use "MY API KEY" as I can see from debug.txt file.

If you don't want to use Google Translate API key or Bing Translator API key you can use this rewrite rules which will force using it without API key:

Code: Select all
# gtranslate config
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2&force_no_api=1 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1&force_no_api=1 [L,QSA]
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4186
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux
cron