I installed i18n with variables translation, updated my settings.php file according to this post. Cleared cache ofc. But on page admin/config/user-interface/lightbox2 in text settings, there is nothing about variables being multilingual. They show just one version in all languages.

Also, on page admin/config/regional/i18n/variable, there are no lightbox2 variables. (not sure if they should be here, perhaps yes)

I don't have an idea where to look further.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gngn’s picture

I experienced the same Problem with lightbox2-6.x-1.x-dev.
That is if you mean the variables lightbox2_node_link_text (default 'View Image Details'), lightbox2_image_count_str ('Image !current of !total'), lightbox2_video_count_str ('Video !current of !total'), lightbox2_page_count_str ('Page !current of !total') and lightbox2_download_link_text ('Download Original').

I edited file lightbox2.module and changed the check_plain(variable_get(...)) to check_plain(t(variable_get(...))), i.e. adding a t() call.

I'm not quite sure how the translation works with all the javascript, but this worked for me in 6.x-1.x-dev.

As the lines do not differ in 7.x-1.x-dev I assume that they will also work there.
So I add two patches:

  • 7.x-1.x-dev: lightbox2-translate-string-variables-1717668-1.patch
  • 6.x-1.x-dev: lightbox2-6.x-1.x-dev-translate-string-variables-1717668-1.patch

Can you - or someone else - test the 7-patch?

greetings, gerhard

gngn’s picture

Status: Active » Needs review

Ups, forgot to change the status to needs-review...

fox mulder’s picture

Works for me, thanks!

fox mulder’s picture

Issue summary: View changes

edit

gdaw’s picture

Issue summary: View changes

I came across this same translation issue on a new site design with the latest lightbox2 installed.

I discussed it with Joseph and this patch will be tweaked and applied soon.

  • joseph.olstad committed 5580247 on 7.x-2.x authored by gngn
    Issue #1717668 by gngn: translation of string variables not working
    
joseph.olstad’s picture

Status: Needs review » Fixed

Fixed in dev 7.x-2.x branch

joseph.olstad’s picture

  • joseph.olstad committed 21c6b79 on 7.x-2.x
    Issue #1717668 by gngn, joseph.olstad, gdaw: translation of string...
  • joseph.olstad committed 8f8add8 on 7.x-2.x
    Issue #1717668 by gngn, joseph.olstad, gdaw: translation of string...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.