Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On all the sites I manage and build there are articles in various languages. There is nothing such as 'default language'.
It would be great if this module could automatically detect the current page's prevailing language. In the Google code at http://translate.google.com/translate_tools you can achieve it by setting language to 'auto'. But this needs to be implemented in your "on fly" method in order to get rid of the annoying blue bar that appears with the above Google code (see and support http://groups.google.com/group/google-translate-general/browse_thread/th...).
Comments
Comment #1
dnotes CreditAttribution: dnotes commented+1 - I'll need this eventually if I'm to continue using this module beyond initial site building.
Comment #2
Vacilando CreditAttribution: Vacilando commentedThis is really urgent because if you try to translate a page in another language it does not work (or rather, it translates just some words from the non-English text that happen to be spelled the same way as some English words, etc.)
You can easily get the language from
$node->language
and use it instead of 'en' as the source. Here is how I got it to work satisfactorily for me, but I would like to switch to your module as soon as you have implemented something like this. Thanks.Comment #3
mrgoltra CreditAttribution: mrgoltra commentedsubscribing
Comment #4
yannickoosubscribe
Comment #5
donquixote CreditAttribution: donquixote commentedthat would be nice, yes.
Comment #6
Juan C CreditAttribution: Juan C commented+1
Comment #7
franzkewd CreditAttribution: franzkewd commentedsubsribe
Comment #8
alpp CreditAttribution: alpp commentedsubscribed
Comment #9
ViNCE CreditAttribution: ViNCE commentedchanging pageLanguage: '$default_language' to pageLanguage: 'auto' did it for me -->
function googleTranslateElementInit2() {new google.translate.TranslateElement({pageLanguage: 'auto', autoDisplay: false}, 'google_translate_element2');}I'm using it on a page where I have multilingual entries on one page that should be translated in another language. The language of each paragraph is known. So I also add the lang attribute in the view e.g.
Comment #10
apadernoI am closing this issue, since Drupal 6 isn't supported anymore.