Change logo according to language

Change logo according to language

by Zeid Fanous -
Number of replies: 6

Hi everyone, 


Would it be possible to change the logo according to language selected, similar to multi-language content ? 


using moodle 3.1 have a great day smile 

Average of ratings: -
In reply to Zeid Fanous

Re: Change logo according to language

by Purnendu Dash -
Picture of Plugin developers

You can not change logo according to language selected, because you can upload only one logo using theme. It is only feasible with help of custom coding.


Regards,

Purnendu

In reply to Zeid Fanous

Re: Change logo according to language

by Rahul Rai -

Hi Zeid

If you decouple  language with logo so, It can be possible.  

In reply to Rahul Rai

Re: Change logo according to language

by Francis Mashalla -
I'm interested to know more about this, please provide me with details. I'm using moodle 3.4.2


In reply to Zeid Fanous

Re: Change logo according to language

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

It is possible to do this providing that you have access to your moodle site files.

All you need to do is add a directory called "images" to your sites Moodle directory.

Add all the logo images you want to use and name each one with their respective langauage code.

For example:

logo-en.jpg
logo-fr.jpg
logo-es.jpg
logo-it.jpg

Which represent logos for the English, French, Spanish, Italian speaking communities.

Then you need to add the following to the Custom CSS area of your themes settings page:

Of couse what you add here will be determined which theme you are using as all theme can have different ways in which the logo style is written.

But generally it would look like this:

div.logo img { visibility: hidden; }

div.logo (
     background-width: 200px;
     background-height: 100px;
     background-position: left top;
     background-size: 100% auto;
}

.lang-en div.logo { background-image: logo-en.jpg;}
.lang-fr div.logo { background-image: logo-fr.jpg;}
.lang-es div.logo { background-image: logo-es.jpg;}
.lang-it div.logo { background-image: logo-it.jpg;}

 This is only a rough guide, as I have not tested it but it should work providing that the styles are written in accordance to the theme's layout for the logo.

Hope this helps?

Mary

Average of ratings: Useful (4)
In reply to Mary Evans

Re: Change logo according to language

by Zeid Fanous -
Thank you Rahul and Mary, this is wonderful. 


clients in the middle east look for bilingual themes, while english is the primary language used, Arabic is also required.  RTL is still improving :0 ...its all good though smile 


Thanks again. i will surely be doing the aforementioned. 

In reply to Zeid Fanous

Re: Change logo according to language

by lylou lou -

Hello Zeid,

I was wondering if you have come across a solution that would allow me to display content on the portal ( home page ) in the language of the visitors. Either by identifying the browser or by the user selection of the language from the language drop down menu.

Thanks