Closed (fixed)
Project:
Juicebox HTML5 Responsive Image Galleries
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Nov 2013 at 13:55 UTC
Updated:
16 Dec 2013 at 05:40 UTC
Jump to comment: Most recent
Comments
Comment #1
rjacobs commentedHi,
I assume that you are referring to the translation of Juicebox interface options via the languageList variable described at http://juicebox.net/support/creation/#language-list ? Furthermore, you are wanting this languageList variable to change dynamically based on the active language that is reported within Drupal?
This would be possible with the use of the juicebox_gallery_data alter hook (these kinds of dynamic substitutions of XML data is what that hook was setup for). However, this does require some custom coding.... is that something you would be up for so long as you had some general guidance?
Comment #2
rjacobs commentedI thought about this more and I'd like to prioritize it as an interface option, not just something that can be done in a local customization. I don't think it will be that hard to integrate the "languageList" XML option with the Drupal translation system, and since "languageList" works in both Juicebox Lite and Pro, this concept should probably be natively supported by the module. I'm also personally all-for better multilingual support.
It looks like we just need to pass a base (English) set of interface strings through Drupal's t() function, and then add them to the XML output via the "languageList" option. So long as a site admin enters translations into the site for this set of strings (via the Locale module for example), the Juicebox interface will become language aware along with the rest of the site. That'll be quite nice.
I'll try to get something in place soon. It'll have to be against 7.x-2.x.
Comment #3
rjacobs commentedAlright, I'm moving fast on a lot of 7.x-2.x development, and have committed some changes that should enable this new translation feature.
Here's how it works:
You will essentially be translating a single string who's english version is something like:
Show Thumbnails|Hide Thumbnails|Expand Gallery|Close Gallery|Open Image in New Window|Next Image|Previous Image|Play Audio|Pause Audio|Show Information|Hide Information|Start AutoPlay|Stop AutoPlay|AutoPlay ON|AutoPlay OFF|Go Back|Buy this Image|Share on Facebook|Share on Twitter|Share on Google+|Share on Pinterest|Share on Tumblr|ofAnd who's translation will become something like (for French):
Afficher Vignettes|Masquer Vignettes|Afficher Plein Ecran|Quitter Plein Ecran|Ouvrir Dans Nouvelle Fenêtre|Suivant|Précédent|Démarrer Audio|Pause Audio|Afficher Informations|Masquer Informations|Démarrer Lecture Auto|Arrêter Lecture Auto|Lecture Auto ON|Lecture Auto OFF|Aller Retour|Acheter Cette Image|Partager sur Facebook|Partager sur Twitter|Partager sur Google+|Partager sur Pinterest|Partager sur Tumblr|desThat's it, after the translation is entered (via Locale) the Juicebox interface should automatically toggle along with the rest of Drupal.
Comment #4
rjacobs commentedI just released 7.x-2.0-beta2, which includes this new feature, so I'm going to go ahead and mark this as fixed. At a minimum it adds the base framework for interface/tooltip translation. If additional comments come up on this it'll probably be best to open a separate issue.
Comment #5
voodoodan245730 commentedVery cool work, Sorry didnt reply any sooner!
Many thanks!
Comment #6
voodoodan245730 commentedVery cool work, Sorry didnt reply any sooner!
Many thanks!