Disable translating of a part of my text

Popular automatic website translation tool

Disable translating of a part of my text

Postby Ellie741 » Tue Nov 20, 2018 3:29 pm

I'm working on an admin page to create post for a blog. I have a french textarea and an english textarea. So, for those who cannot translate by there own, I created a button "translate with google":

Code: Select all
<a id="tr_textefr" href="http://translate.google.fr/#fr/en/" target="_blank">
Traduire avec Google</a>


And my french textarea has a javascript function called onkeyup :

Code: Select all
function translate(what){
var button = "tr_" + what;
var textarea = document.getElementById(what);
var google = "http://translate.google.fr/#fr/en/" + textarea.value;

document.getElementById(button).setAttribute('href', google);
}


For exemple, if I write "Voulez-vous coucher avec moi ce soir ?", it will change the href attribute for "http://translate.google.fr/#fr/en/Voulez-vous coucher avec moi ce soir ?". The link will redirect at the translated version of my text (by google translate).

This code works fine by the way. The thing is that I could have sometimes bbcode inside my text: "Voulez-vous coucher avec moi ce soir ?".

So, is there a way with google translate to disable translating of some words or sentences ? For exemple, I don't wanna translate the words between two @ : "Voulez-vous @@[email protected]@ avec moi ce soir ?"
Ellie741
 
Posts: 2
Joined: Tue Oct 23, 2018 8:38 am

Re: Disable translating of a part of my text

Postby Edvard » Tue Nov 20, 2018 6:41 pm

Hi,

Your question is not related to GTranslate.

We provide full website translation, you can find out more at https://gtranslate.io

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

Re: Disable translating of a part of my text

Postby Ellie741 » Fri Nov 23, 2018 11:19 am

Edvard wrote:Hi,

Your question is not related to GTranslate.

We provide full website translation, you can find out more at https://gtranslate.io" rel="nofollow" target="_blank" rel="nofollow" target="_blank

Thanks! :)


Ohh! Is that so?
I was having problem using Gtranslate. So, i posted my query here, i thought i will get some help here. i apologize for this did. thanks!
Ellie741
 
Posts: 2
Joined: Tue Oct 23, 2018 8:38 am

Re: Disable translating of a part of my text

Postby Yana » Mon Nov 26, 2018 2:35 pm

you are welcome
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: 4512
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