As still too many options and modules in Drupal, Node Gallery is not really Multi language (yet). It is not possible to have just one and the same Gallery in several languages through Node Gallery!
When you want to translate a Node Gallery gallery, you are required to upload the images AGAIN for each new language. That is NOT the same gallery in several languages, that is several independent galleries that are somehow connected. I guess in the current situation, if you change a picture in the "English version" this doesn't sinchronize to the Dutch, Italian or Spanish version. That is not multilangauge and specially not efficient, in time, Kb and carbon footprint.
Are there any thoughts of turning this, further excellent, module to REAL Multilanguage?
Thank you, dankjewel, gracias, grazie, Danke schön, merci beaucoup, tusend takk, terima kasi, efgaristo, moito obrigado, arigato.
Comments
Comment #1
justintime CreditAttribution: justintime commentedSince NG is just nodes, I think the Internationalization module may do this for you?
Specifically, pulled from it's Feature Overview:
Does that give you what you need?
Comment #2
colordrops CreditAttribution: colordrops commentedsub
Comment #3
srobert72 CreditAttribution: srobert72 commentedSubscribing
Comment #4
msvilp CreditAttribution: msvilp commentedI have a partial solution for this problem:
I use locale and internationalization -modules, and I have basic multi-language site running (node translations etc.). Node gallery is version 6.x-2.0-alpha12.
I have translatable gallery nodes, but non-translatable image nodes. So I can internationalize my gallery descriptions but not image descriptions or image titles.
Each gallery can be translated to different languages, but normally all the images added to a translation stick to that node and are not visible in other languages. I changed this behaviour by modifying the SQL query to get images accross all language versions of selected gallery.
Here is the modified query. node_gallery.inc, line 129:
Should this kind of behaviour be provided as option, or even default? If so, I can put together a patch.
Comment #5
dddave CreditAttribution: dddave commentedIf this isn't working this is a bug. There is already this issue: #759322: Multilingula support with i18n so it seems that i18n is not 100% at the moment. I am going to take a look on the i18n abilities and report back.
Comment #6
dddave CreditAttribution: dddave commentedOk, this needs some thinking. The described behavior is logical as translations ARE new nodes. Therefore the gallery relationship runs somewhat empty when the added pictures were attached to the untranslated gallery node. When we translate the gallery node we create effectively a new gallery. Because this is the default drupal behavior this does not qualify as a bug.
One of the maintainers needs to have a look at this in because I cannot judge the implications of the code change proposed in #4.
Translating images is working. Of course it would make no sense to create an English gallery and attach German images because German users wouldn't be able to see the gallery in the first place. So translating images at the moment only makes sense for neutral galleries.
The problem here is that instead of two nodes connected via a relationship (gallery+image) we have to juggle four now. I don't know if this can architecturally be solved properly. The link in #5 describes additional interface problems.
Thoughts?
Comment #7
justintime CreditAttribution: justintime commentedDo you have any idea how i18n keeps track of related nodes? There's got to be something that says nid 3 and nid 4 are translations of nid 2. I have never dug into i18n, so I'm at a loss.
Comment #8
dddave CreditAttribution: dddave commentedI have a faint of memory about reading a write-up once. I'll see if I can dig it up. You may contact Jose Reyero or one of the other maintainers but perhaps directly as the i18n issue queue has its problems...
Don't wait for it tonight though. Need some sleep.
Comment #9
justintime CreditAttribution: justintime commentedNM, I see the tnid field from the SQL above. I just don't know enough about this to really feel comfortable. @scroogie is multilingual, perhaps he can chime in?
Comment #10
scroogie CreditAttribution: scroogie commentedThis is core translate. All nodes that are in fact translations of other nodes have the nid of the "original node" in the tnid column.
We would need to check if the content type is translation enabled and then load the source node. There are core functions to do that. It would look like that:
The problem is that the translated node still is a node on its own, so users can specifically upload to that node.
The question is what do the users want? Do they want that galleries are all the same in all languages, or do they want to delete or add images in other languages? I'd say let's make all our pages (Upload, manage, sort, etc.) smart enough to use the original node id instead of the translated one. This would make sure that all galleries are the same.
The problem gets harder when people start to translate image nodes, because then we would have to ask ourself how to deal with 'french' image nodes that are attached to 'english' galleries and so on.
Comment #11
scroogie CreditAttribution: scroogie commentedActually, I take that back. Perhaps it would be a cool feature to be completely capable of internationalization, I don't think a lot of gallery modules are. But I'd invest in this if there would be enough users interested in it.
The thing is, Views supports filtering by content translation, so we could make our gallery real smart:
Gallery language neutral -> display all language neutral images (and by a global option show images of all languages)
Gallery of language x -> display all language neutral images plus all images of language x
filefield works with reference counting, so we would add new references to the fid to the table content_field_node_gallery_image.
It only makes sense to spend time on this, if there would be enough users interested in it, though. Perhaps we can implement #10 first and put this here on our todo for later versions.
Comment #12
srobert72 CreditAttribution: srobert72 commentedI'm interested in this feature ;-)
Comment #13
justintime CreditAttribution: justintime commentedJudging by all the issues I've seen over the last 8 mos or so that I've been involved, I think there's a pretty strong following internationally. I think it may be worth it if it can be done cleanly. The scope of this has definitely warranted bumping it up to an NG3 feature request. Writing this feature into 2.x would invariably introduce some bugs, and further delay the beta release.
Comment #14
dddave CreditAttribution: dddave commentedAgreed. Unless someone can implement this cleanly we have to live with the status as is. I'll try to find some time to provide some docs to summarize the i18n-ability of NG2.
Perhaps, after a ("final") beta of NG2 is released any progress on this (perhaps someone provides a decent patch) can be put into the NG2 dev.
For NG3 sensible i18n integration is really a must have. This still warrants some thinking about usecases before it is implemented.
Comment #15
dddave CreditAttribution: dddave commentedJust to keep it on the radar. Nedd to check out NG3 sometime soon to evaluate...
BTW noticed that I wanted to do a write-up...narf.
Comment #16
scroogie CreditAttribution: scroogie commentedPerhaps we can put this on some kind of Roadmap for later 3.x versions.
Comment #17
scroogie CreditAttribution: scroogie commentedJust bumping this so I don't forget it. Sorry.
Comment #18
dddave CreditAttribution: dddave commentedIs there at the moment any awareness of language settings in NG3? It seems to me that content (gallery or image) is displayed regardless of the language it is set to. So if my site is in English mode I can see German galleries and images.
Comment #19
savedario CreditAttribution: savedario commentedI am interested in this feature too.
Comment #20
scroogie CreditAttribution: scroogie commentedThis is still tricky. I don't think I'll have enough time to do this properly now, so perhaps we should postpone this. What we need to do:
- attach a language filter to our views that by default does nothing (lets all nodes pass)
- on gallery node view:
- if the image type is translateable, but not the gallery type, set the filter to show only images that are language neutral or of the current language.
- if both types are translateable, set the filter to display only images that are language neutral or of the language of the gallery
- adapt our custom queries for translations
- write a node api hook for 'prepare translation' that carries our gallery nid over for images
The big open question is how to handle translations of galleries, and I don't know a solution for that right now. If images already exist in the gallery, we would probably have to carry them over depending on the language of the source gallery and the language of the images. In that case we need to duplicate the nodes with Batch API setting the tnid and gid properly. If a source node changes, it's the responsibility of the site admin to change the child translations. Other modules do the same.
All this seems technically possible, we just need the time to carry out the work.
Comment #21
justintime CreditAttribution: justintime commentedPostponing this for 3.1 - there's too much to do, and there's a good chance that much code will bring about new bugs that would further delay release.
Comment #22
ayalsule CreditAttribution: ayalsule commentedsubscribe , waiting for 3.1.
Comment #23
krishinsh CreditAttribution: krishinsh commentedSubscribing
Comment #24
Suren CreditAttribution: Suren commentedI also need that feature very much.
Subscribing
Comment #25
krishinsh CreditAttribution: krishinsh commentedI was looking in to the Node Gallery source (Node Gallery 6.x-3.0-alpha3) and found a place where the image nids are collected:
node_gallery.inc line 348:
$sql = "SELECT ngi.nid FROM {node_gallery_images} ngi JOIN {node} n on ngi.nid = n.nid WHERE $where gid = %d $orderby";
My idea was to change the image node list similar to comment #4 to get the list of images of current gallery and also the translation galleriy linked by the filed node.tnid
My questions is- can I actually do that? Is there something that will brak after I do this ?
I need to get the translation running as soon as possible and I want to see the same images in both translated and original gallery.
Comment #26
suffering drupal CreditAttribution: suffering drupal commentedHello again,
I just happened to run into this very old post of mine. (It has taken me some time to discover how to find my own postings back...) And surprisingly the issue still hot here.
In the meantime I have been able to solve the language issue long ago thanks to Gallery Assist :-)) - http://drupal.org/project/gallery_assist.
It has the "syncronize" effect directly incorporated, so you just make a nice source page with it's gallery, and then all translations simply inherit the gallery. Even so, you can "internationalize" the description (title) to the fotos, in other words, the same gallery can have different descriptions for each language.... that is, if you have the time to comment them all of course ;) You can also add a caption and even a copyright reference. Additionally it has a lot more options that are really cool, too many to mention actually.
If you (still) have the same problem as I had on starting this post, a year and a half ago, you really should have a look. It is one of the very few modules in Drupal that did NOT make me suffer! :) And in fact, we couldn't even have launched our website without it.
I happily invite you to get a live impression at http://costadelaluz.on-map.net/en/beaches/los-canos-de-meca-coast-of-lig...
this is one of our few galleries where you can see the translation of the descriptions. Best is to click the description text below the thumbnail to really enjoy it - that's where you really go to the slide-show (http://costadelaluz.on-map.net/en/beaches/los-canos-de-meca-coast-of-lig...). Clicking the photo itself opens up the lightbox.
Comment #27
ctrnz CreditAttribution: ctrnz commentedAs far as i see 3.x relies on Views to display output of images.
Therefor I suppose - something can be done about in Views themselves. No need to break a module.
However when I select Node Translation: Source translation as Relationship it is not enough.
Perhaps someone could give a clue how to choose Parent gallery from Source translation and then use it for picking up images?
Comment #28
ctrnz CreditAttribution: ctrnz commentedHere is my "workaround".
First of all - what I needed (everyone has unique needs).
I have gallery content type which is in two languages. Gallery images are language neutral.
When You create this content (Parent gallery) images are uplaoded. After that you translate this content (another Parent gallery but in different language). My wish was to avoid image uploading again.
I made use of viewsphpfilter
So I crated one more page display in node_gallery_gallery_image_views. Let's call it "Translation". Made argument Override and removed it from this display.
Then I added Views filter Node: PHP filter. Relationship is Parent Gallery, Operator is Filter to these IDs, Handel is PHP code and code itself is
Code still should be improved with IFs to make it much safer but I just giving idea how to do it.
All You need after this is to change gallery settings and set Gallery view definitions to "Translation".
Thank You for great gallery module! :)
Comment #29
scroogie CreditAttribution: scroogie commentedCrosslinking to another i18n issue that should be respected: #1109074: Noderef field count no image in other language
Comment #30
ayalsule CreditAttribution: ayalsule commentedis it time to active this issue?
Comment #31
crea CreditAttribution: crea commentedSubscribing
Comment #32
ayalsule CreditAttribution: ayalsule commented@ctrnz your method in #28 dosen`t worked with me, is there any thing missing , please recheck
thanks.
Comment #33
ImanDalain CreditAttribution: ImanDalain commentedI need this feature too ... asap please.
thanks a lot.
Comment #34
ayalsule CreditAttribution: ayalsule commenteddid you tried method in #28, give us your reviews.
Comment #35
ctrnz CreditAttribution: ctrnz commentedI did recheck and i can't see anything missing. Do you have same needs as I did?
What is your setup and what errors do you get?
Comment #36
ayalsule CreditAttribution: ayalsule commentedI just want to avoid upload images again, can you confirm and explain more views steps , step by step please
many thanks :)
Comment #37
ImanDalain CreditAttribution: ImanDalain commentedi did the same steps at #28 but it didn't work :(
i don't know why, i have the same needs.
would you please provide me with the step by step process
thank a lot :)
Comment #38
ctrnz CreditAttribution: ctrnz commentedHave you done this step?
All You need after this is to change gallery settings and set Gallery view definitions to "Translation".
I've just recreated everything with clean install and different languages and it still works.
Have a look yourself. Details sent to you by contact form.
Comment #39
ayalsule CreditAttribution: ayalsule commentedthanks ... @ctrnz
I will test :)
Comment #40
ayalsule CreditAttribution: ayalsule commentedplease check this issue :
if you didn`t translated the gallery ,the images will not displayed.
many thanks
Comment #41
ctrnz CreditAttribution: ctrnz commentedSolution is very easy.
Last line in Node: PHP filter replace with this one:
Comment #42
ImanDalain CreditAttribution: ImanDalain commentedThanks Thanks Thanks @ctrnz
it is work :)
Comment #43
James Andres CreditAttribution: James Andres commented#28 worked well for me too. A few notes on specific issues I encountered:
gallery_image_translation/%
Comment #44
zengenuity CreditAttribution: zengenuity commentedAt this point, I won't be adding new features to the D6 version. If features are wanted for D7, please post a new issue.