Forum Archive - GTranslate and JoomFish specific pages

GTranslate and JoomFish specific pages
Feb 28, 2011 10:44 am by [email protected]
Hi, I am using an GTranslate Pro and I am trying to integrate it with JoomFish. Basicly, what I am trying to do is to translate only few pages manually, with JoomFish, in specific languages (e.g. german,russian,greek) and the rest of the (german,russian,greek) pages to be translated by GTranslate. Also, the rest of the website, which is not required to be translated manually, to be translated by GTranslate. Is this possible with GTranslate? and how? I've found some guides of doing it with free version but not in pro.
Re: GTranslate and JoomFish specific pages
Feb 28, 2011 12:20 pm by Edvard
Yes, you can add check conditions before rewriting the language to 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_URI} !^/de # the language code handled by JoomFish RewriteCond %{REQUEST_URI} !^/el # the language code handled by JoomFish RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA] RewriteCond %{REQUEST_URI} !^/de # the language code handled by JoomFish RewriteCond %{REQUEST_URI} !^/el # the language code handled by JoomFish RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]
Re: GTranslate and JoomFish specific pages
Feb 28, 2011 1:01 pm by [email protected]
Thanks for prompt response, In the suggested code all of the (de,el) pages will be translated manually with JoomFish. But, what I am trying to do is : to translate only 4 pages in JoomFish out of 40 of language "de". The other 36 "de" pages to be handaled by GTranslate. The same applays to the "ru" language. I think that, I need to call somehow, in the "Missing Translation" plugin of JoomFish, the GTranslate to do the job, when the translation is missing.
Re: GTranslate and JoomFish specific pages
Feb 28, 2011 1:11 pm by Edvard
If you know the URL of the pages you want to be handled by JoomFish instead, you can write longer exception instead of just !^/de, it can be like this: ^!/de/my_page_url.html You can add more than one RewriteCond and it will use AND logic.
Re: GTranslate and JoomFish specific pages
Feb 28, 2011 1:19 pm by [email protected]
I think your approach is straitforward, and should do be enough for few pages. In my case I have more than 8 languages x 4 JoomFish Pages = 32 UrI (at least) Are you sure that there is no easy way to handle this situation? It could become managment nightmare :( Thanks
Re: GTranslate and JoomFish specific pages
Feb 28, 2011 1:27 pm by Edvard
You can use Regular Expressions to add the exceptions. Please read also mod_rewrite documentation on apache.org. Like (en|ru|it) will be treat as en or ru or it, etc... That will decrease the number of lines to be added in the .htaccess
Re: GTranslate and JoomFish specific pages
Feb 28, 2011 1:37 pm by [email protected]
Thanks, If it is no trouble could you provide a sample of code, also the above code Give's me 500 server error:(
Re: GTranslate and JoomFish specific pages
Feb 28, 2011 2:20 pm by Edvard
Make sure that you add correct line breaks, so every condition or rule is on one line. As I mentioned you can use this below to not add the same for every language. RewriteCond %{REQUEST_URI} !^/(de|el|ru)/the_rest_url.html
Re: GTranslate and JoomFish specific pages
Mar 1, 2011 8:43 am by [email protected]
Hi, Everything work superb as you suggested, except for the home page: I wrote for the home page RewriteCond %{REQUEST_URI} !^/(de|el|ru)/ but it gives me: http://www.domain.com/de/ ---> it gives me the Index of /de ... and not the page http://www.domain.com/el/ ---> it gives me the Index of /el... and not the page hot to fix it? thanks
Re: GTranslate and JoomFish specific pages
Mar 1, 2011 9:35 am by Edvard
You can use $ which means the end of the line, ^ means the beginning. So it will be !^/(de|el|ru)/$
Re: GTranslate and JoomFish specific pages
Mar 1, 2011 10:11 am by [email protected]
I have tried several combinations ... RewriteCond %{REQUEST_URI} !^/(el|de|ru)/$ --> Index of /de RewriteCond %{REQUEST_URI} !/(el|de|ru)/$ --> GTranslate page RewriteCond %{REQUEST_URI} !^/(el|de|ru)$/ --> GTranslate page

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
Translate website to any specific language, on page loadJan 19, 2019 6:49 amReplies: 1Post by: Leaon7756

Try GTranslate with a free 15 day trial