Forum Archive - Can I block a page from translation?

Can I block a page from translation?
Dec 11, 2014 7:35 pm by apeks
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!
Re: Can I block a page from translation?
Dec 12, 2014 7:46 am by Yana
Hi, You will need to add class="notranslate" attribute to the wrapper element of the text you do not want to be translated.
Re: Can I block a page from translation?
Dec 12, 2014 10:43 pm by apeks
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
Re: Can I block a page from translation?
Dec 15, 2014 8:35 am by Yana
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.
Re: Can I block a page from translation?
Dec 16, 2014 8:14 pm by apeks
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
Re: Can I block a page from translation?
Dec 17, 2014 8:43 am by Yana
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/

SIMILAR TOPICS

GT doesn't work...error 404 pageJan 28, 2019 5:36 pmReplies: 1Post by: vincenzodinuzzo
Translate website to any specific language, on page loadJan 19, 2019 6:49 amReplies: 1Post by: Leaon7756
Best way to translate a page in WordPress?Jan 7, 2019 11:10 amReplies: 3Post by: Tonnystark
German translation changes the centuryDec 31, 2018 3:06 pmReplies: 1Post by: adrievdl
Graphic translation for every language is missingDec 19, 2018 7:54 amReplies: 1Post by: Daryl Dixon

Try GTranslate with a free 15 day trial