[SOLVED] language selector

jagy2a

Joined: 2009-09-30
Posts: 14
Posted: Thu, 2013-05-02 14:48

Hi,

I need to replace the dropdown menu in the language selector by the corresponding flags, can anyone help me on this?

I'm using:
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.17 cgi
Webserver = Apache
Database = mysqlt 5.5.28-29.3-log, lock.system=flock
Toolkits = ArchiveUpload, Exif, Getid3, LinkItemToolkit, NetPBM, Thumbnail
Operating system = Linux serv
Theme = CARBON

Thanks.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2013-05-02 15:38

The easiest way is through CSS.
gallery2/themes/your theme/theme.css add one of these for each language in the selector:

option[value="en_US"]:after {
  padding-left: 2px;
  content: url('flags/en_US.png');
}

you would need an image for each language and a directory for flag images in gallery2/themes/your theme/flags

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
jagy2a

Joined: 2009-09-30
Posts: 14
Posted: Fri, 2013-05-03 14:13

Thanks for your answer!
I modified the theme.css as suggested but it only adds a flag to each language in the dropdown menu.
What I need to do is eliminate the dropdown menu completely and show the flags instead.
Any suggestions?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2013-05-03 16:22

Oops, I missed the replace part.

rename the attached to LanguageSelector.tpl and upload to /modules/core/templates/blocks/local/LanguageSelector.tpl

this will require your flag images to be in gallery2/images/flags and to be named as described above.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
jagy2a

Joined: 2009-09-30
Posts: 14
Posted: Mon, 2013-05-06 13:13

Oh wooow ! It worked perfectly ! Thank you!

Jagy