coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: emjay_smitten on January 26, 2010, 01:12:24 AM

Title: How to call chosen language for MENU and GALLERY in themes
Post by: emjay_smitten on January 26, 2010, 01:12:24 AM
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
Title: Re: How to call chosen language for MENU and GALLERY in themes
Post by: Joachim Müller on January 26, 2010, 07:20:20 AM
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616
Title: Re: How to call chosen language for MENU and GALLERY in themes
Post by: emjay_smitten on January 26, 2010, 08:21:55 PM
Oops, sorry about that. My bad.

http://www.haiticontacts.com/pictures
Title: Re: How to call chosen language for MENU and GALLERY in themes
Post by: Joachim Müller on January 27, 2010, 07:40:24 AM
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
Title: Re: How to call chosen language for MENU and GALLERY in themes
Post by: emjay_smitten on January 27, 2010, 10:36:19 AM
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?

Title: Re: How to call chosen language for MENU and GALLERY in themes
Post by: Joachim Müller on January 27, 2010, 12:04:22 PM
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.
Title: Re: How to call chosen language for MENU and GALLERY in themes
Post by: emjay_smitten on January 27, 2010, 11:37:54 PM
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.

Title: Re: How to call chosen language for MENU and GALLERY in themes
Post by: Joachim Müller on January 29, 2010, 09:04:23 AM
You haven't done as I suggested, so I won't look into your issues. Additionally, you cross-posted (http://forum.coppermine-gallery.net/index.php/topic,38100.msg315266.html#msg315266) 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.