![Mad :x](/assets/images/forum-smilies//icon_mad.gif)
Url rewriting with joomfish 2nd language
Jun 6, 2013 7:38 am by gmarchetto
Jun 6, 2013 7:38 am by gmarchetto
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.
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]
![Mad :x](/assets/images/forum-smilies//icon_mad.gif)
Re: Url rewriting with joomfish 2nd language
Jun 6, 2013 8:12 pm by Yana
Jun 6, 2013 8:12 pm by Yana
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.
Re: Url rewriting with joomfish 2nd language
Jun 7, 2013 4:23 am by gmarchetto
Jun 7, 2013 4:23 am by gmarchetto
thanks for reply.
Someone knows hot to disable URL translations in Joomfish?
Re: Url rewriting with joomfish 2nd language
Jun 7, 2013 7:28 am by Yana
Jun 7, 2013 7:28 am by Yana
Hi,
Do you have 3rd party SEF extension installed ? If yes , please check the settings.
Re: Url rewriting with joomfish 2nd language
Jun 7, 2013 7:53 am by gmarchetto
Jun 7, 2013 7:53 am by gmarchetto
NO, I have only the joomla core sef component
Re: Url rewriting with joomfish 2nd language
Jun 7, 2013 4:35 pm by Yana
Jun 7, 2013 4:35 pm by Yana
Hi,
You can contact Joomfish support team and ask to instruct .
SIMILAR TOPICS
Large numbers of crawl errors with double language code | Jan 24, 2019 1:43 am | Replies: 1 | Post by: natastna2 |
Translate website to any specific language, on page load | Jan 19, 2019 6:49 am | Replies: 1 | Post by: Leaon7756 |
Graphic translation for every language is missing | Dec 19, 2018 7:54 am | Replies: 1 | Post by: Daryl Dixon |
How to remove mobile Language Select Button transparency | Dec 5, 2018 10:06 pm | Replies: 10 | Post by: JeffTR |
Change language automatically | Nov 26, 2018 9:29 pm | Replies: 3 | Post by: Antilb |