Forum Archive - Installing GTranslate for a subdirectory Joomla installation

Installing GTranslate for a subdirectory Joomla installation
Aug 27, 2013 3:58 pm by Tllrrb5
Hello, I have an old Joomla site let's say, http://www.tllrrb5.com (just a sample) I am currently developing a new version of it with the latest Joomla in a subdirectory http://www.tllrrb5.com/newsite I tried to install GTranslate PRO in the new site and the GTranslate Free module and configured on the fly translation. Now when I click the flag icon, the url goes to http://www.tllrrb5.com/xx/newsite I've discovered that for subdirectory installations, I should use the instruction for the general version. I followed the instructions there and installed the gtranslate in the root. It becomes worse, the translation is not working. I expected that because the following htaccess rules provided: # 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] seems not to make sense to me (I know htaccess). Because of that, I tried installing the general gtranslate within /newsite/ subdirectory. I tried to check and then I fixed the htaccess myself: RewriteBase /newsite # 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=newsite/$2 [L,QSA] RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ gtranslate/translate.php?lang=newsite/$1 [L,QSA] After that it worked! However, I have another issue, the menu urls are still redirecting to this pattern: http://www.tllrrb5.com/xx/newsite. I'm wondering why it's redirecting to that. That page is a "no page found". The pattern http://www.tllrrb5.com/newsite/xx is already working. Another issue is that it's affecting JSN Slideshow photo slide url. Instead of http://www.tllrrb5.com/newsite/images/i ... w/boys.png it becomes http://www.tllrrb5.com/ru/newsite/image ... w/boys.png Can you please help me on this?
Re: Installing GTranslate for a subdirectory Joomla installa
Aug 27, 2013 9:42 pm by Yana
Hi, If your website is in the subdirectory, you should use GTranslate Pro general version. The language code should be after the domain name not after the subfolder. You should add the redirect rules after RewriteEngine On and GTranslate should be in the root directory. As to the Slideshow photo , you can add rule in your .htaccess file to redirect images to the default language. Here is an example: RewriteRule ^([a-z]{2})/newsite/images/imageshow/(.*) /newsite/images/imageshow/$2 [R=301,L]

SIMILAR TOPICS

Gtranslate MultisiteFeb 12, 2019 7:27 amReplies: 1Post by: infact_dat
Gtranslate: Error with numberFeb 20, 2019 1:20 amReplies: 1Post by: infact_dat
GTranslate 3.7.4, Joomla 3.9.3 - doGTranslate is not definedFeb 22, 2019 12:34 pmReplies: 1Post by: oase
Add-on gtranslate no longer worksFeb 2, 2019 6:01 amReplies: 1Post by: DarylDixon
Instragram and Gtranslate...!!!!Dec 19, 2018 11:18 amReplies: 1Post by: zackfernandes

Try GTranslate with a free 15 day trial