"Automatic Translation" text

Popular automatic website translation tool

"Automatic Translation" text

Postby gtaranti » Sat Oct 25, 2014 9:58 am

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.
gtaranti
 
Posts: 15
Joined: Sat Oct 25, 2014 9:54 am

Re: "Automatic Translation" text

Postby gtaranti » Mon Oct 27, 2014 9:27 pm

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.
gtaranti
 
Posts: 15
Joined: Sat Oct 25, 2014 9:54 am

Re: "Automatic Translation" text

Postby Yana » Tue Oct 28, 2014 5:04 pm

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.
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: 4134
Joined: Thu Jan 12, 2012 6:21 pm

Re: "Automatic Translation" text

Postby gtaranti » Tue Oct 28, 2014 5:14 pm

For free version?
gtaranti
 
Posts: 15
Joined: Sat Oct 25, 2014 9:54 am

Re: "Automatic Translation" text

Postby gtaranti » Tue Oct 28, 2014 5:19 pm

The TEXT could only be in the default language and could be translated to the others languages automatically!
gtaranti
 
Posts: 15
Joined: Sat Oct 25, 2014 9:54 am

Re: "Automatic Translation" text

Postby Yana » Fri Oct 31, 2014 2:16 am

Hi,

You can add class="notranslate" and GTranslate will not translate that text.
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: 4134
Joined: Thu Jan 12, 2012 6:21 pm

Re: "Automatic Translation" text

Postby gtaranti » Fri Oct 31, 2014 2:20 am

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.
gtaranti
 
Posts: 15
Joined: Sat Oct 25, 2014 9:54 am

Re: "Automatic Translation" text

Postby Edvard » Fri Oct 31, 2014 3:13 am

Hi,

You need to modify doGTranslate javascript function for that.

Thanks!
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: "Automatic Translation" text

Postby gtaranti » Fri Oct 31, 2014 3:32 am

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.
gtaranti
 
Posts: 15
Joined: Sat Oct 25, 2014 9:54 am

Re: "Automatic Translation" text

Postby Edvard » Fri Oct 31, 2014 3:40 am

Hi,

You may try to check for googtrans cookie. Not sure about the cookie name.

Thanks!
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: "Automatic Translation" text

Postby gtaranti » Fri Oct 31, 2014 3:57 am

Nice tip!
gtaranti
 
Posts: 15
Joined: Sat Oct 25, 2014 9:54 am

Re: "Automatic Translation" text

Postby gtaranti » Fri Oct 31, 2014 4:14 am

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):

Code: Select all
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
gtaranti
 
Posts: 15
Joined: Sat Oct 25, 2014 9:54 am

Re: "Automatic Translation" text

Postby Edvard » Fri Oct 31, 2014 7:18 am

Thanks for sharing!
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
cron