coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Quinti on May 31, 2006, 05:00:45 AM

Title: put lang variables in categories or picture titles?
Post by: Quinti on May 31, 2006, 05:00:45 AM
Hi people
a question:

is possible create new language variables, and put it in the categories or title descriptions?
i probe it, for example in langs/galician.php:

$varnewtitlecategoryone= 'my language description';

and then
in the category, put

<?php $varnewtitlecategoryone ?>


but no run jiji
are there any way to insert anything of code in the forms, category form, picture title form, etc..?

thank u very much
and greetings!
Title: Re: put lang variables in categories or picture titles?
Post by: Paver on May 31, 2006, 05:22:31 AM
First of all, it would be dangerous to allow PHP code in form fields.

Secondly, nearly all output is done through function calls, which would require a "global $varnewtitlecategoryone" declaration in the function, before that variable would be available for output.

I think it should be possible to set up a code that would give a sanitized way of accessing language variables.

But I guess I don't understand what use this would have.  Would users use these variables?  Would you need a dictionary of available language variables that available to use in such a system?
Title: Re: put lang variables in categories or picture titles?
Post by: Joachim Müller on May 31, 2006, 07:28:21 AM
As far as I can see, Quinti is trying to create a multi-lingual version of coppermine, with textual content (that should reside in the database) residing in the language file instead. It would be incredibly hard to provide translations of dynamic content (e.g. category names, album names, titles, description etc.) for many languages. This has been requested before, but would result in huge performance penalties, cluttered code and little use for most.
Bottom line: currently not possible, unless you're willing to make huge changes to the core code.