Can I block a page from translation?

Popular automatic website translation tool

Can I block a page from translation?

Postby apeks » Thu Dec 11, 2014 11:35 pm

I use your Enterprise product on Joomla site about sports betting and it works very well and translates my content to country subdomains, eg Italian version at http://it.mysite.com

However I have a legal issue whereby some of my pages cannot be shown in some countries as sports betting is prohibited

Is there a way I can stop one of my pages from being translated and published on a subdomain.

In other words I have a single page that I want to block from being translated and available for Italians and Dutch visitors. I really hope so!
apeks
 
Posts: 12
Joined: Tue Mar 26, 2013 11:19 pm

Re: Can I block a page from translation?

Postby Yana » Fri Dec 12, 2014 11:46 am

Hi,
You will need to add class="notranslate" attribute to the wrapper element of the text you do not want to be translated.
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: 4135
Joined: Thu Jan 12, 2012 6:21 pm

Re: Can I block a page from translation?

Postby apeks » Sat Dec 13, 2014 2:43 am

Hi again Yana,

I am not clear on what you mean?

An english page on the website is translated to dutch and published on dutch subdomain http://nl.mysite.pagename

I am assuming that if I apply class="notranslate" the page will still appear at http://nl.mysite.pagename but not be translated?

Instead I want only that page to not appear at all at http://nl.mysite.pagename but still be translated and appear for other translations.

Can you tell me specifically what I should do?

Many thanks
Adrian
apeks
 
Posts: 12
Joined: Tue Mar 26, 2013 11:19 pm

Re: Can I block a page from translation?

Postby Yana » Mon Dec 15, 2014 12:35 pm

Dear Adrian,

Yes, if you add class-"notranslate" attribute you will see http://nl.mysite.pagename in English. You can remove the language code from URL by adding the class "nturl" also. If you want to do this only for one language you should write a small script which will detect the current selected language and then add appropriate class toy the HTML tag. You may detect the selected language by using _SERVER['HTTP_X_GT_LANG'] variable in PHP .
There is also another solution. You can add redirection rule to your .htaccess to redirect that page to the original language.
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: 4135
Joined: Thu Jan 12, 2012 6:21 pm

Re: Can I block a page from translation?

Postby apeks » Wed Dec 17, 2014 12:14 am

The htaccess solution sounds best. However I am unsure how to set a redirect for a subdomain that is essentially created by Gtranslate. Could you suggest the correct code to use?

Many thanks
apeks
 
Posts: 12
Joined: Tue Mar 26, 2013 11:19 pm

Re: Can I block a page from translation?

Postby Yana » Wed Dec 17, 2014 12:43 pm

Hi,
Please try the following rule

RewriteCond %{HTTP:X-GT-Lang} nl
RewriteRule /pagename/(.*) http://www.yourdomain.com/pagename/$1 [R=301,L]

this will redirect nl.yourdomain.com/pagename/ to yourdomain.com/pagename/
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: 4135
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 0 guests

2GLux
cron