Hi
I would like to be able to translate the textcontent in my gallery (Categoryname, albumnames, descriptions, etc. etc., even comments.)
I've searched the forum, and found only one relevant previously thread:
Titles / descriptions in more than one language (
http://forum.coppermine-gallery.net/index.php?topic=2121.0) originally created on 2003-12-03, 08:48:54
The thread provides some CSS hack for i.e. displaying picture descriptions according to selected language.
Gaugau says in that thread that this have been thought of by the dev team, but dropped due to lack of users needing this feature.
I for one am a user that would welcome it greatly.
Agreed, this would require a rewrite that is bigger than to be called a patch, but it might not be a major rewrite aither?
It's all a question of how much to put into it of course, but there is no need to make a complete CMS to achieve this on a simple level.
Now, I don't know any PHP, and can therefore not verify if my methods are appliable to coppermine. I am an experienced web programmer using Java, and might think differently than the dev team of coppermine.
To make this behaviour in coppermine we actually only need to create one new table, (again this is no CMS, only the simplest solution) and to modify the ones containing texts today.
I.e:
CREATE TABLE <prefix>_texts(
textID INTEGER NOT NULL AUTO_INCREMENT,
browsercode VARCHAR(5),
textvalue TEXT,
PRIMARY KEY (textID)
);
--The browsercode field should probably be abstracted into a languages table (or be maintained in a configfile), since a languageID is at least in my preference a lot more maintainable than a varchar thus being easier to work with for developers.
Then the existing tables with texts should be given a reference to this table:
ALTER TABLE <prefix>_categories ADD nameID INTEGER DEFAULT 0;
ALTER TABLE <prefix>_categories ADD descriptionID INTEGER DEFAULT 0;
and so on.
Then there have to be implemented a getTextvalue function in i.e. "functions.inc.php", with the textID and the requested languageID as parameters which returns a text.
This function should be supplemented by some language fallback function to ensure a result. (Check system default language, then english, than any?!?)
After this there's only the userfriendliness on how to input the texts, but I'm the opposite of an expert on that, being a programmer... ;-)
My preference in implementing websolutions is to put all (text)content in a database, and not in files. This feature request is of course based on that preference.
I know there are developers that disagrees with me, and I know this would generate some additional queries in some pages, thus slow coppermine a bit, but the latter would hardly be noticeable in my opinion.
I also know that this solution may sound simple, but may not be so to implement in coppermine.
Of course you competent members of the devteam have a lot of better solutions, but this is only meant as a starting point...
Hopefully there are more people than me that would welcome this feature, and that there are some developers that want to implement it for 1.4.
John