How do I change the title of the language in the drop down?

Popular automatic website translation tool

How do I change the title of the language in the drop down?

Postby 5W0P3 » Wed Mar 20, 2013 7:39 pm

How do I change the title of the language in the drop down?

For instance. The drop down says:

"Select Language"
--English
--Spanish

I would prefer it say and the same thing when it's in spanish.
--English
--Espanol

Possible?
5W0P3
 
Posts: 12
Joined: Tue Mar 19, 2013 10:07 am

Re: How do I change the title of the language in the drop do

Postby Edvard » Wed Mar 20, 2013 7:50 pm

Hi,

You will need to edit the code and replace:

<select onchange="doGTranslate(this);">

with

<select onchange="doGTranslate(this);" class="notranslate">

You should find it in modules/mod_gtranslate/tmpl/default.php file.
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: 4186
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: How do I change the title of the language in the drop do

Postby 5W0P3 » Wed Mar 20, 2013 8:01 pm

Edvard wrote:Hi,

You will need to edit the code and replace:

<select onchange="doGTranslate(this);">

with

<select onchange="doGTranslate(this);" class="notranslate">

You should find it in modules/mod_gtranslate/tmpl/default.php file.


That doesn't seem to be working, but I did notice, if I refresh the page and its in english and i select ENGLISH from my drop down - it goes to some crazy langauge - what's happening?
5W0P3
 
Posts: 12
Joined: Tue Mar 19, 2013 10:07 am

Re: How do I change the title of the language in the drop do

Postby Edvard » Wed Mar 20, 2013 8:04 pm

I cannot see that you have changed it when I look into your source code.
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: 4186
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: How do I change the title of the language in the drop do

Postby 5W0P3 » Wed Mar 20, 2013 8:10 pm

Edvard wrote:I cannot see that you have changed it when I look into your source code.

Not sure what happened but its working now. How do I change though where it says "Spanish" in the drop down to "Espanol"
5W0P3
 
Posts: 12
Joined: Tue Mar 19, 2013 10:07 am

Re: How do I change the title of the language in the drop do

Postby Edvard » Wed Mar 20, 2013 8:12 pm

You need to search for Spanish in default.php file and replace it with what you want.
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: 4186
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: How do I change the title of the language in the drop do

Postby 5W0P3 » Wed Mar 20, 2013 8:48 pm

Edvard wrote:You need to search for Spanish in default.php file and replace it with what you want.

Awesome!
5W0P3
 
Posts: 12
Joined: Tue Mar 19, 2013 10:07 am

Re: How do I change the title of the language in the drop do

Postby Yana » Wed Mar 20, 2013 9:39 pm

Thank you!
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: 4140
Joined: Thu Jan 12, 2012 6:21 pm

Re: How do I change the title of the language in the drop do

Postby DF30000 » Thu Jul 18, 2013 3:52 pm

I too wish to stop GTranslate from translating the language drop down menu. I am using Drupal 7 GTranslate module and cannot seem to find the default.php for GTranslate module for Drupal 7. I wish to keep English as the only language in the language drop down menu
DF30000
 
Posts: 36
Joined: Fri Jul 12, 2013 6:09 pm

Re: How do I change the title of the language in the drop do

Postby Yana » Thu Jul 18, 2013 9:37 pm

Hi,
You can choose the languages which you want to be visible and save the configuration.
Please check the documentation https://gtranslate.io/docs/55-drupal-documentation
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: 4140
Joined: Thu Jan 12, 2012 6:21 pm

Re: How do I change the title of the language in the drop do

Postby DF30000 » Fri Jul 19, 2013 2:05 pm

Hi Yana
I've gone through the documentation you provided as a link. I did select English as the main language, the issue is that I wish to keep the language in the drop down menu as English regardless what language is used on the page. Better still the country's name in the drop down menu should be in their own language, at present whenever someone goes to a language all the text in the drop down menu is translated

I copied the quote from

Edvard wrote:
Hi,

You will need to edit the code and replace:

<select onchange="doGTranslate(this);">

with

<select onchange="doGTranslate(this);" class="notranslate">

You should find it in modules/mod_gtranslate/tmpl/default.php file.

My query is that on Drupal 7, where is the default.php file. so I can add the class="notranslate"?
DF30000
 
Posts: 36
Joined: Fri Jul 12, 2013 6:09 pm

Re: How do I change the title of the language in the drop do

Postby Yana » Fri Jul 19, 2013 6:03 pm

Hi,
You need to make changes in gtranslate.module file. Login via ftp and you will find the file in drupal modules.
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: 4140
Joined: Thu Jan 12, 2012 6:21 pm

Re: How do I change the title of the language in the drop do

Postby DF30000 » Fri Jul 19, 2013 7:08 pm

Hi I've looked at the documentation and cannot see where I can disable translation for the drop down menu. In the Language Configuration I've already checked the main language as English but still the text in the drop down menu is being translated - any other information regarding Edvard's recommendation to add the


<select onchange="doGTranslate(this);" class="notranslate">

for a Drupal 7 install?
DF30000
 
Posts: 36
Joined: Fri Jul 12, 2013 6:09 pm

Re: How do I change the title of the language in the drop do

Postby Yana » Fri Jul 19, 2013 9:37 pm

You need to change the source code of the GTranslate module and add class="notranslate"
There is no option to disable the translation of the dropdown list.
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: 4140
Joined: Thu Jan 12, 2012 6:21 pm

Re: How do I change the title of the language in the drop do

Postby DF30000 » Mon Jul 22, 2013 12:46 pm

HI, I replied previously saying that i checked the documentation, and checked the main language to be English, however all the text for the language drop down menu is translated as well as the main body text, I don't want the language drop down menu to be translated. So apart from choosing English as the main language what else do I need to do, or am I missing something?
DF30000
 
Posts: 36
Joined: Fri Jul 12, 2013 6:09 pm

Re: How do I change the title of the language in the drop do

Postby Yana » Mon Jul 22, 2013 11:57 pm

Hi,
As I said in my previous posts, you need to make changes in the source code of gtranslate free module and add class="notranslate" attribute.
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: 4140
Joined: Thu Jan 12, 2012 6:21 pm

Re: How do I change the title of the language in the drop do

Postby DF30000 » Tue Jul 23, 2013 1:10 pm

hI, I am still waiting for a reply. I checked the https://gtranslate.io/docs/55-drupal-documentation link and I have done all that is required, ie chose English as the main language and still the language drop down menu is translated - have I missed something?
DF30000
 
Posts: 36
Joined: Fri Jul 12, 2013 6:09 pm

Re: How do I change the title of the language in the drop do

Postby DF30000 » Tue Jul 23, 2013 7:02 pm

I went to the drupal documentation link and checked English as the main language but this hasn't stopped the text from being translated from English in the language drop down menu
DF30000
 
Posts: 36
Joined: Fri Jul 12, 2013 6:09 pm

Re: How do I change the title of the language in the drop do

Postby DF30000 » Tue Jul 23, 2013 7:19 pm

Hi Yana

Apologies, I did not notice that there was a second page to this thread and only just found your replies. I opened gtranslate.module and on line 183 and 279 I changed to


$block_content .= '<select onchange="doGTranslate(this);" class="notranslate">';

and the language drop down menu now does not translate and remains in English, thanks for you help (and patience).

For Drupal 7 users - I found the php file in /sites/all/modules/gtranslate/gtranslate.module
DF30000
 
Posts: 36
Joined: Fri Jul 12, 2013 6:09 pm

Re: How do I change the title of the language in the drop do

Postby Yana » Wed Jul 24, 2013 1:28 am

:) good to hear that!
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: 4140
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