Url rewriting with joomfish 2nd language

Popular automatic website translation tool

Url rewriting with joomfish 2nd language

Postby gmarchetto » Thu Jun 06, 2013 11:38 am

Hello

I have some problems with my gtranslate+joomfish joomla 1.5 website (see setting below)
I read all about this in the forum, but I was not able to solve. :x

Italian: http://www.marinonimacchineutensili.it/ ... -sito.html
english: http://www.marinonimacchineutensili.it/en/sitemap.html

PROBLEM: the gtranslate module doesn't work correctly? switching from it to en the url becomes http://www.marinonimacchineutensili.it/ ... -sito.html which is not managed by joomfish.

Joomfish rewrites the urls for english, gtranslate module doesn't it.

How to solve this? I can give you FTP access and Joomla admin access, if you need it, thanks.

-------------------------------------------------------------------------------------------

SETTINGS

Joomla 1.5.26
Joomfish 2.2.3
GTranslate PRO (general version)
Free module GTRanslate (version 1.5.x.33)

Main language: it
Second language: en (with joomfish)
Other languages: to be managed by gtranslate Pro

Jf router polugin: no language identification, no 302 redirecr, no cookied, sef prefix (it/en)

Gtranslate module: Operate with GTranslate PRO ON, Translation method: redirect, sile language (italian for italian module, english for english module)

/gtranslate/Config.php

<?php

define('MAIN_LANG', 'it'); // Main language code: en, ar, bg, hr, cn, ct, cs, da, et, tl, fi, fr, gl, el, iw, hi, es, nl, id, ja, ca, ko, lt, lv, mt, de, no, pt, ru, ro, sr, sk, sl, sv, th, tr, uk, hu, vi, it, pl, sq

define('API_KEY', 'INSERT-YOUR-KEY'); // You can get your Google Translate API key from https://code.google.com/apis/console/?api=translate
define('AUTO_DETECT_LANG', true); // set to true if you have mixed language content, works with Google only
define('CACHE_TIME', 365*24*60*60); // 1 year by default, no need to decrease
define('LICENSE', 'license.dat');
define('SSL_VERIFY_PEER', true); // disable if you get CA certificate error and cannot reconfigure your server to solve the issue
define('FOLLOW_LOCATION', false); // if your site have redirects for some URLs and for that reason you see blank pages, you need to enable this feature
define('USE_BING_TRANSLATOR', false); // Enable it to use Bing Translotor instead of Google Translate

define('BING_API_KEY', 'INSERT-YOUR-KEY'); // If the option above is enabled you need to get your Bing API key from http://www.bing.com/developers/createapp.aspx (PHP SOAP client is required)
define('DEBUG', true); // turn on for debug mode

// username and password to edit translations, please change for security reasons,
// this is not your google login/pass, you need to think something new
define('USER', 'xxxxxxxx');
define('PASS', 'yyyyyyyyy');

.htaccess
# 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
RewriteCond %{REQUEST_URI} !^/it
RewriteCond %{REQUEST_URI} !^/en
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteCond %{REQUEST_URI} !^/it
RewriteCond %{REQUEST_URI} !^/en
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]
gmarchetto
 
Posts: 5
Joined: Wed Jun 05, 2013 8:57 pm

Re: Url rewriting with joomfish 2nd language

Postby Yana » Fri Jun 07, 2013 12:12 am

Hi,
If you want to use GTranslate Pro with Joomfish you will need to change .htaccess rules and replace [a-z]{2}with the language codes which you want to translate via GTranslate.

# 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 ^(af|ar|az|be|bg|ca|cs|cy|da|de|el|es|et|eu|fa|fi|fr|ga|gl|hi|hr|ht|hu|hy|id|is|it|iw|ja|ka|ko|lt|lv|mk|ms|mt|nl|no|pl|pt|ro|ru|sk|sl|sq|sr|sv|sw|th|tl|tr|uk|ur|vi|yi|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^(af|ar|az|be|bg|ca|cs|cy|da|de|el|es|et|eu|fa|fi|fr|ga|gl|hi|hr|ht|hu|hy|id|is|it|iw|ja|ka|ko|lt|lv|mk|ms|mt|nl|no|pl|pt|ro|ru|sk|sl|sq|sr|sv|sw|th|tl|tr|uk|ur|vi|yi|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]


Please note that with GTranslate Pro you cannot translate the URLs and you will need do disable URL translation.
Regards,

Yana Ghahramanyan - 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
Yana
 
Posts: 4134
Joined: Thu Jan 12, 2012 6:21 pm

Re: Url rewriting with joomfish 2nd language

Postby gmarchetto » Fri Jun 07, 2013 8:23 am

thanks for reply.
Someone knows hot to disable URL translations in Joomfish?
gmarchetto
 
Posts: 5
Joined: Wed Jun 05, 2013 8:57 pm

Re: Url rewriting with joomfish 2nd language

Postby Yana » Fri Jun 07, 2013 11:28 am

Hi,
Do you have 3rd party SEF extension installed ? If yes , please check the settings.
Regards,

Yana Ghahramanyan - 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
Yana
 
Posts: 4134
Joined: Thu Jan 12, 2012 6:21 pm

Re: Url rewriting with joomfish 2nd language

Postby gmarchetto » Fri Jun 07, 2013 11:53 am

NO, I have only the joomla core sef component
gmarchetto
 
Posts: 5
Joined: Wed Jun 05, 2013 8:57 pm

Re: Url rewriting with joomfish 2nd language

Postby Yana » Fri Jun 07, 2013 8:35 pm

Hi,
You can contact Joomfish support team and ask to instruct .
Regards,

Yana Ghahramanyan - 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
Yana
 
Posts: 4134
Joined: Thu Jan 12, 2012 6:21 pm


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest

2GLux
cron