How to call chosen language for MENU and GALLERY in themes How to call chosen language for MENU and GALLERY in themes
 

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

How to call chosen language for MENU and GALLERY in themes

Started by emjay_smitten, January 26, 2010, 01:12:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

emjay_smitten

Hello,

I use the I-feel-dirty-2 theme. In there the side menu is hardcoded. e.g. Gallery Menu, User Menu, Link and Gallery.
I changed Gallery Menu to Category Menu but I want to get them displayed in the chosen language.

So for spanish the 'Category' would be 'Categoria', etc.

Any way how to call these in the theme template?

Thanks,

Martin



Joachim Müller

Can't replicate, please elaborate: where in the menu is the word "Category" hard-coded?

Joachim

P.S. Announcement thread for the i-feel-dirty theme is http://forum.coppermine-gallery.net/index.php/topic,38100.0.html

emjay_smitten

At http://www.haiticontacts.com/pictures on the right side you see: Gallery Menu, User Menu, Links, Categories.

I want these titles to change automatically according to the chosen language. In the themes section the menu-items inside Gallery Menu and User Menu are called from CPG so I think this is the right board?


Joachim Müller

That last box "Categories" is not there in the original theme (take a look at the demo for i-feel-dirty if you don't believe me), so it must be something you deliberately added/edited. Now you're asking us how to change that? That's impossible. Anyway, if you just want to figure out how to create a language toggle, use the PHP var $USER['lang'] to determine what language file the visitor is using. Something likeif ($USER['lang'] == 'german'){
    // your custom code for German-speaking visitors here
} elseif ($USER['lang'] == 'french') {
    // your custom code for French-speaking visitors here
} else {
    // your custom code for all others (default) here
}
should do the trick.

If you want details, post details: zip your custom theme folder and attach the zip to your posting.

emjay_smitten

I guess I will do that because this snippet although handy will has to be implemented maybe 5 times. There must be an easy way.

All I wanted was to change dynamically the text between the <h3> tags.


Joachim Müller

You haven't done as I suggested, so I won't look into your issues. Additionally, you cross-posted and posted crap there like
Quote from: emjay_smitten on January 28, 2010, 06:59:48 PMYou can try to tell it in a more friendly way.
although you were told to stay out of that thread. I'm not ready to be lectured by you, so be warned: continuing to misbehave will get you banned. I'm out of this thread.