Forum Archive - "Automatic Translation" text

"Automatic Translation" text
Oct 25, 2014 5:58 am by gtaranti
Hi, is there any option to show a text "This is an automated translation" only if the page is translated? This text could be in the header or footer, but I don't want it to be there if the visitor uses the default (untranslated) web site language.
Re: "Automatic Translation" text
Oct 27, 2014 5:27 pm by gtaranti
Anybody? Maybe this is not used by anyone. My view is that the page viewer has to know that the translation is mechanical and not by a human, in order to acknowledge any "silly" mistakes.
Re: "Automatic Translation" text
Oct 28, 2014 1:04 pm by Yana
Hi, You will need to use custom programming on your side to display a that text. You can find the current selected language code and display the text depending on it. For GTranslate Pro Joomla system plugin it is JSession::get('glang'); For the GTrnslate Pro General version it is $_GET['glang'] variable. If you are using Gtranslate Enterprise version you can find the current selected language code from X-GT-Lang request header. You can find it in _SERVER['HTTP_X_GT_LANG'] variable.
Re: "Automatic Translation" text
Oct 28, 2014 1:14 pm by gtaranti
For free version?
Re: "Automatic Translation" text
Oct 28, 2014 1:19 pm by gtaranti
The TEXT could only be in the default language and could be translated to the others languages automatically!
Re: "Automatic Translation" text
Oct 30, 2014 10:16 pm by Yana
Hi, You can add class="notranslate" and GTranslate will not translate that text.
Re: "Automatic Translation" text
Oct 30, 2014 10:20 pm by gtaranti
Maybe I wasn't clear enough. I'm using the 'on-the-fly' translation mode with FREE Gtranslate. How can I embed programmatically a line in every TRANSLATED page which would read "This is an AUTOMATED translation"? Of Course this line should not appear when the default language is used.
Re: "Automatic Translation" text
Oct 30, 2014 11:13 pm by Edvard
Hi, You need to modify doGTranslate javascript function for that. Thanks!
Re: "Automatic Translation" text
Oct 30, 2014 11:32 pm by gtaranti
Thanks. I will have an line with display:none and when the doGTranslate js functiom fires it will change to display:block The problem is how to distinguish when the user switch back to the default site language in order to activate again the display:none style in this line.
Re: "Automatic Translation" text
Oct 30, 2014 11:40 pm by Edvard
Hi, You may try to check for googtrans cookie. Not sure about the cookie name. Thanks!
Re: "Automatic Translation" text
Oct 30, 2014 11:57 pm by gtaranti
Nice tip!
Re: "Automatic Translation" text
Oct 31, 2014 12:14 am by gtaranti
The cookie name is as you said googtrans and the js code to check its existence is (thanks to stackoverflow http://stackoverflow.com/questions/5968196/check-cookie-if-cookie-exists): document.cookie.match(/^(.*;)?\s?googtrans=[^;]+(.*)?$/) So, checking the nullness of this expression inside the doGTranslate function, someone can toggle the display style of the "AUTOMATIC TRANSLATED PAGE". Thank you for your guidance. :D
Re: "Automatic Translation" text
Oct 31, 2014 3:18 am by Edvard
Thanks for sharing!

SIMILAR TOPICS

Onloading the plugin quickly flashes up flags and text namesFeb 7, 2019 3:29 pmReplies: 1Post by: brobertson
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
Problem of translation in my websiteDec 8, 2018 12:15 pmReplies: 1Post by: Ibrahim
Disable translating of a part of my textNov 20, 2018 11:29 amReplies: 3Post by: Ellie741

Try GTranslate with a free 15 day trial