GTranslate and JoomFish specific pages

Popular automatic website translation tool

GTranslate and JoomFish specific pages

Postby [email protected] » Mon Feb 28, 2011 2:44 pm

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.
[email protected]
 
Posts: 9
Joined: Wed Jan 05, 2011 3:45 pm

Re: GTranslate and JoomFish specific pages

Postby Edvard » Mon Feb 28, 2011 4:20 pm

Yes, you can add check conditions before rewriting the language to GTranslate:

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_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]
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: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: GTranslate and JoomFish specific pages

Postby [email protected] » Mon Feb 28, 2011 5:01 pm

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.
[email protected]
 
Posts: 9
Joined: Wed Jan 05, 2011 3:45 pm

Re: GTranslate and JoomFish specific pages

Postby Edvard » Mon Feb 28, 2011 5:11 pm

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.
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: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


Re: GTranslate and JoomFish specific pages

Postby Edvard » Mon Feb 28, 2011 5:27 pm

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
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: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


Re: GTranslate and JoomFish specific pages

Postby Edvard » Mon Feb 28, 2011 6:20 pm

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.
Code: Select all
RewriteCond %{REQUEST_URI} !^/(de|el|ru)/the_rest_url.html
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: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


Re: GTranslate and JoomFish specific pages

Postby Edvard » Tue Mar 01, 2011 1:35 pm

You can use $ which means the end of the line, ^ means the beginning.

So it will be !^/(de|el|ru)/$
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: 4183
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