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.
I have my site set to English as its default language. When I change the translation to English (users do weird things) it translates the page into another language (Dutch I believe, which would be the language before it alphabetically). If I change the language to something else and back to English it works fine.
So if the first thing you do is tell it to translate to default language it doesn't do nothing it translates it to something else.
Comment | File | Size | Author |
---|---|---|---|
#2 | gtranslate-onthefly-default-lang-1982656-2.patch | 1.48 KB | ejrasmus |
Comments
Comment #1
Jinghan Wang CreditAttribution: Jinghan Wang commentedSame problem here. Is there any solution? The module translates content to Afrikaans instead of English in my case.
Comment #2
ejrasmus CreditAttribution: ejrasmus as a volunteer commentedHow I fixed this was disabling the default language in the dropdown if it was already in the default language. The default language is then enabled again once a different language is selected.
Comment #3
Jinghan Wang CreditAttribution: Jinghan Wang commentedThanks for the path. @ejrasmus. I did it by same method through a js file with some other custom feature.
Comment #4
sumithb CreditAttribution: sumithb commentedI updated the script as follows and I didn't updated the contributed module. I added following js code in a separate js file and included it from the custom theme.
Now initially the default language will be disabled and also user will not be able to select the active language.
Also
Also I added following code to the custom module.
Comment #5
gruda CreditAttribution: gruda commentedI am having the same problem using 7.x-1.10. It seems the block html structure has changed a bit and the fix in #4 is no longer working. Modifying the javascript slightly seems to work for me. I am using the 'On the fly' option and have also include the php from #4.
Comment #6
dieppon CreditAttribution: dieppon as a volunteer commentedI can confirm that the issue still not addressed on 7.x-1.10 and the patch works.
Comment #7
attheshow CreditAttribution: attheshow at Richland Library commentedI just added a patch for this issue in D8 here: https://www.drupal.org/project/gtranslate/issues/2820025
Comment #8
apadernoComment #9
edo888 CreditAttribution: edo888 commentedPlease test: https://www.drupal.org/project/gtranslate/releases/8.x-2.x-dev
Comment #10
edo888 CreditAttribution: edo888 commentedComment #11
the_g_bomb CreditAttribution: the_g_bomb at Cyber-Duck commentedNeeds backport to D7
Comment #12
i-trokhanenkoPatch #2 is still compatible with the 7.x-1.15 version of the module.