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.
In the id="numberDisplay" the text doesn't get translated even though there is a translated string "Image !current of !total", but I can't tell where it belongs to. It is clearly not used when images are displayed in the overlay.
Comment | File | Size | Author |
---|---|---|---|
#4 | lightbox2-imagecount-translatable-1887188-4.patch | 642 bytes | andiart |
Comments
Comment #1
andiart CreditAttribution: andiart commentedI have a solution for that. The module doesn't work with hook_variable_info to expose its variables to the translation module. Therefor I wrote a hook into the module file:
Important was to comment out some parts in lightbox2.install because deleting is handled automatically now:
And in lightbox2.admin.inc
* You can already find the variable under /de/admin/config/system/variable/module in a lightbox2 tab and alter it's value
* Secondly you have to declare the variable as multilingual, which is technically spoken adding it to the realm called " language" under: de/admin/config/regional/i18n/variable
* Then you can translate the variable in the variable realm called language under admin/config/system/variable/realm/language/edit
I will make a patch for the dev version soon.
Comment #2
andiart CreditAttribution: andiart commentedComment #3
spade CreditAttribution: spade commentedThanks, I appreciate it.
Comment #4
andiart CreditAttribution: andiart commentedHere is the patch. It though does not remove the image_count variable from the lightbox2 settings form, because users without variables module should still be able to edit it. For translation you will need variable translation and the variable module enabled. Then follow the instructions from #1
Comment #5
andiart CreditAttribution: andiart commented