Topic Closed
SHan
27 Posts

Hi,

is there a way to give a class to the language in use in the website?

Example: I'm surfing the website in english, so i'd like to have a background-color to the word English so people could see:

English   Deutsch   Espanol 

Thank you.

 

4 years ago#9084

a2exfr
242 Posts
25.9K Downloads
2 Themes
10 Plugins

Personally I never used Plugin Multilanguage.

But I look how it work and seems to me it, do not show your current page language.

So you need to find directory where your plugin is installed, and find file MultiLanguage.php.

Edit it find this (lines 152-158 ):

            if( $lang_code == $current_page_lang ){
                continue;
            }

            $index        = $list[$lang_code];
            $title        = common::IndexToTitle($index);
            $links[]    = common::Link($title,$lang_label);

and change to this:

            $cl="";
            if( $lang_code == $current_page_lang ){
                $cl='class="current_lang"';
            }

            $index        = $list[$lang_code];
            $title        = common::IndexToTitle($index);
            $links[]    = common::Link($title,$lang_label,'',$cl);

After that link with word English will have class current_lang

If you remote install this plugin it should be placed somethere in  _addoncode  folder.

4 years ago#9090

SHan
27 Posts

Great!

Thank you, it works.

I think it will be useful to add this in the original plugin.

 

 

4 years ago#9092

Topic Closed

 

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register