How do I add Indian languages in Drupal GTranslate?

Popular automatic website translation tool

How do I add Indian languages in Drupal GTranslate?

Postby rag_gupta » Sun Sep 18, 2011 10:10 am

Google translate supports many Indian languages as well: Bihari, Bengali, Kannada etc
How can I add those in Gtranslate?
I don't need other country languages.


I've made the following changes in 2 places in the gtranslate.module but still it does not add those new languages:

Code: Select all
$languages = array('en'=>'English','ar'=>'Arabic','bg'=>'Bulgarian','zhCN'=>'Chinese (Simplified)','zhTW'=>'Chinese (Traditional)','hr'=>'Croatian','cs'=>'Czech','da'=>'Danish','nl'=>'Dutch','fi'=>'Finnish','fr'=>'French','de'=>'German','el'=>'Greek','hi'=>'Hindi','it'=>'Italian','ja'=>'Japanese','ko'=>'Korean','no'=>'Norwegian','pl'=>'Polish','pt'=>'Portuguese','ro'=>'Romanian','ru'=>'Russian','es'=>'Spanish','sv'=>'Swedish','ca'=>'Catalan','tl'=>'Filipino','iw'=>'Hebrew','id'=>'Indonesian','lv'=>'Latvian','lt'=>'Lithuanian','sr'=>'Serbian','sk'=>'Slovak','sl'=>'Slovenian','uk'=>'Ukrainian','vi'=>'Vietnamese','sq'=>'Albanian','et'=>'Estonian','gl'=>'Galician','hu'=>'Hungarian','mt'=>'Maltese','th'=>'Thai','tr'=>'Turkish','fa'=>'Persian','af'=>'Afrikaans','ms'=>'Malay','sw'=>'Swahili','ga'=>'Irish','cy'=>'Welsh','be'=>'Belarusian','is'=>'Icelandic','mk'=>'Macedonian','yi'=>'Yiddish','hy'=>'Armenian','az'=>'Azerbaijani','eu'=>'Basque','ka'=>'Georgian','ht'=>'Haitian Creole','ur'=>'Urdu','bn'=>'Bengali','bh'=>'Bihari','gu'=>'Gujarati','kn'=>'Kannada','ml'=>'Malayalam','mr'=>'Marathi','or'=>'Oriya','pa'=>'Punjabi','sa'=>'Sanskrit','te'=>'Telugu','ta'=>'Tamil' );
Last edited by rag_gupta on Tue Sep 20, 2011 1:23 pm, edited 1 time in total.
rag_gupta
 
Posts: 3
Joined: Sun Sep 18, 2011 10:07 am

Re: How do I add Indian languages in GTranslate?

Postby rag_gupta » Tue Sep 20, 2011 1:22 pm

Edvard why my question has been singled out and has got no replies?

I think except for Hindi other Indian languages in Google translate are in Beta.

Although I've checked to yes to show other Indian languages- Gujarati, Kannada etc by making changes in the above post but those (except Hindi) don't appear in the GTranslate block - please see the top right of my site.
rag_gupta
 
Posts: 3
Joined: Sun Sep 18, 2011 10:07 am

Re: How do I add Indian languages in Drupal GTranslate?

Postby Edvard » Tue Sep 20, 2011 3:20 pm

The Indian languages are not available through the Translate API and cannot be added in the Free version. However if you buy the Pro version I can add them for you and they will work.
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: How do I add Indian languages in Drupal GTranslate?

Postby rag_gupta » Tue Sep 20, 2011 4:59 pm

Will it include both Joomla & Drupal modules for single fee?
I'm using your module in both Joomla & Drupal sites.
rag_gupta
 
Posts: 3
Joined: Sun Sep 18, 2011 10:07 am

Re: How do I add Indian languages in Drupal GTranslate?

Postby Edvard » Wed Sep 21, 2011 5:28 pm

The Pro license is for one domain name only.
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: How do I add Indian languages in Drupal GTranslate?

Postby yogesh224 » Mon Mar 26, 2012 12:51 pm

Hi Edvard,

I bought a pro license for drupal module, but I cannot add other Indian Language(Bengali, kannada,Gujarati,etc).
Could you please help on how to get this working.

Regards
Yogesh
yogesh224
 
Posts: 1
Joined: Mon Mar 26, 2012 12:48 pm

Re: How do I add Indian languages in Drupal GTranslate?

Postby Yana » Mon Mar 26, 2012 9:00 pm

Hi,
You can use General HTML code for the language selector and add the languages you want but in this case you should use the dropdown list instead of flags. Here is the code :
Code: Select all
<!-- GTranslate: http://gtranslate.net/ -->
<select onchange="doGTranslate(this);"><option value="">Select Language</option><option value="en|en">English</option><option value="en|fr">French</option><option value="en|hi">Hindi</option><option value="en|es">Spanish</option><option value="en|sw">Swahili</option><option value="en|ur">Urdu</option><option value="en|yi">Yiddish</option></select>

<script type="text/javascript">
/* <![CDATA[ */
function doGTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];var plang=location.pathname.split('/')[1];if(plang.length !=2 && plang != 'zh-CN' && plang != 'zh-TW')plang='en';if(lang == 'en')location.href=location.protocol+'//'+location.host+location.pathname.replace('/'+plang+'/', '/')+location.search;else location.href=location.protocol+'//'+location.host+'/'+lang+location.pathname.replace('/'+plang+'/', '/')+location.search;}
/* ]]> */
</script>
<script type="text/javascript" src="http://joomla-gtranslate.googlecode.com/svn/trunk/gt_update_notes0.js"></script>


You can add more options like this:
<option value="en|gu">Gujarati</option>

You need to create additional folders in the /gtranslate/cache directory i.e : /gtranslate/cache/gu

You will find the language codes here:
http://code.google.com/apis/language/tr ... .html#enum
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: How do I add Indian languages in Drupal GTranslate?

Postby trotsak » Tue Mar 27, 2012 5:10 am

yogesh224, have you solved your problem? I have multilingual site http://pen4pals.com/ on Drupal so I was amazing how few languages has Gt Pro.
trotsak
 
Posts: 51
Joined: Tue Mar 20, 2012 5:08 am

Re: How do I add Indian languages in Drupal GTranslate?

Postby Yana » Tue Mar 27, 2012 12:12 pm

Hi,
You can use the general HTML code for the language selector .

yogesh224 wrote:Hi Edvard,

I bought a pro license for drupal module, but I cannot add other Indian Language(Bengali, kannada,Gujarati,etc).
Could you please help on how to get this working.

Regards
Yogesh
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


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux
cron