![]() |
|
download different image depending on language - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: download different image depending on language (/thread-9769.html) |
download different image depending on language - nbruley - 2012-03-13 Hi, If you want the short question, it is: The reason behind the question is as follows: I have kind of a unique situation. I have music files in my gallery, and I would like to have a download link show up that links to a different file, depending on the language. I'm thinking I can accomplish this with the custom data field fairly simply, by adding the alternate language file name in the field, uploading the different file to the same album and leaving it unpublished. Do you think this would work? Something like as follows: ` download different image depending on language - sbillard - 2012-03-13
download different image depending on language - nbruley - 2012-03-13 Thanks sbillard. That got me going in the right direction, even though I needed a little different function.
My working code is as follows for anyone interested. You'd have to adapt the force download to your own application. The code to reference the image for a file_exists call is different than the web address, which is what often gets me confused. ` download different image depending on language - acrylian - 2012-03-13 You might want to look at the downloadList plugin for the force download. download different image depending on language - sbillard - 2012-03-13 As always, the code we might post on this forum is an example and will have to be changed for the specific circumstance. In this case |