Advanced search  

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

Pages: [1]   Go Down

Author Topic: How to call chosen language for MENU and GALLERY in themes  (Read 5603 times)

0 Members and 1 Guest are viewing this topic.

emjay_smitten

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
How to call chosen language for MENU and GALLERY in themes
« 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

emjay_smitten

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: How to call chosen language for MENU and GALLERY in themes
« Reply #2 on: January 26, 2010, 08:21:55 pm »

Oops, sorry about that. My bad.

http://www.haiticontacts.com/pictures
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to call chosen language for MENU and GALLERY in themes
« Reply #3 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
Logged

emjay_smitten

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: How to call chosen language for MENU and GALLERY in themes
« Reply #4 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?

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to call chosen language for MENU and GALLERY in themes
« Reply #5 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 like
Code: [Select]
if ($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.
Logged

emjay_smitten

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: How to call chosen language for MENU and GALLERY in themes
« Reply #6 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.

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to call chosen language for MENU and GALLERY in themes
« Reply #7 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 and posted crap there like
You 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.