renaming the user galleries "one the fly" renaming the user galleries "one the fly"
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

renaming the user galleries "one the fly"

Started by rrwwxx, September 07, 2007, 10:35:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rrwwxx

GauGau suggested that I should start a new thread for this.

I need to come back once again to all these phrases and words that show up in English language on various gallery pages. I would like to identify all of them and insert appropriate code in order to get rid of it and receive my own language (which is German) if that language is selected.
I searched this forum a while and found various people posting the question concerning
User galleries
This category contains albums that belong to Toontown Gallery members

and the moderators have always replied that this text can be changed in the admin menu.
That is right, however it does not help if you want to keep it in English too.
I have a bilingual gallery (see http://galerie.toontown-click.de) and I found another rather complicated method to identify that string and replace it if necessary. You need to edit index.php for that.
I included the following code lines after
         case 'catlist':
Code:

// replacing English text for German language
    if (strpos($cat_data[0][0],'User galleries')=== false) {}
        else {   if ($CONFIG['lang']=='german') {$cat_data[0][0]=str_replace('User galleries','Benutzer-Galerien',$cat_data[0][0]);
        $cat_data[0][1]=str_replace('This category contains albums that belong to Coppermine users..','Diese Kategorie enthält Alben von Galerie-Mitgliedern.<br /><br />&nbsp;<br />',$cat_data[0][1]);
        }else{$cat_data[0][1].='<br /><br />&nbsp;<br />';} }
// end of modification


If you look closer you'll see that I also added some extra line spacing for the English display too because I wanted a larger gap under that category.

That is a very specific solution, but it doesn't help for still displaying an English text 'User galleries' when clicking on it!  Huh
It still says Galerie > User galleries in the navigation bar and it's <title> too.

Is there any other solution to replace every occurance of User galleries for instance right after it's being read from the database categories description? I tried on various places but I had no luck yet ...
cu,
Roli
°¿°

Tranz

This is going to be an issue with any category, of which User gallery is one. Since category descriptions are defined by the admin, it makes sense to have it in the database and settable in a form, unlike the static text strings used in the lang/*.php files. Even "User galleries" is arbitrary. An admin could change it to whatever they want. We wouldn't want them to have to edit code to do so.

Perhaps the easier albeit less clean solution would be to have descriptions in both languages, as seen in bilingual instructions elsewhere.