Forums | Mahara Themes

General discussion /
Banner changes according to language


Andrew Langford's profile picture
Posts: 23

14 February 2013, 6:48

I am exploring using Mahara for an international collection of ePortfolios. My 'would love to have' is that the title of the site, showing in the banner space at the top of the home page, could change according to the language setting the user has chosen in their settings.

So, if they choose Spanish, the site title appears in Spanish and, if they choose English, the same title appears but rendered in English.

Each language group would have it's own institution in Mahara, so no problem there for the title in the instiution banner to be in the appropriate language.

And, I could just make the whole site banner in multples languages, one below the other, but that would soon get crowded and is a bit of a graphic challenge.

Is my 'would love to have' trying to be too clever or could it be done without too much stress. I'd need to commision someone to do it for me ...

Kristina Hoeppner's profile picture
Posts: 4863

03 March 2013, 12:11

Hello Andrew,

I assume by "Site title" you mean the one that appears in the browser's title bar for example. Unfortunately, that cannot be changed with the current functionality on the front end because there is only one field in the site administration where you can provide that title. The interface language strings are stored in language files, but not any content you enter on the front end.

However, you can change it in the theme and display a static title. This is less flexible because any title changes you make will have to be made in the code, but at least you'll have your site title in Spanish for example.

When you create your theme, normally, it refers to what's in the "raw" theme and thus you don't need to duplicate everything but just make the changes you require. The title variable can be found in /theme/templates/header/head.tpl You can overwrite "{$PAGETITLE}" and have your site title in Spanish. Please note though that you will then only see your site title and not the additional info like "Site options - Site name". If you do want to show that as well, you'll have to tweak the {$PAGETITLE} variable.

Cheers

Kristina

Andrew Langford's profile picture
Posts: 23

25 March 2013, 10:40

HI Kristina,

 

Many thanks for technical reply. Is there anyone out there who make Mahara themes who could help me out do you know?

 

Thanks

Kristina Hoeppner's profile picture
Posts: 4863

25 March 2013, 23:12

Hello Andrew,

Pretty much any Mahara Partner https://mahara.org/partners who offers development services should be able to propose a solution for that.

At Catalyst we tend to find solutions that can be incorporated into Mahara core so that future generations of Mahara users can benefit and you don't have to worry about keeping a customization alive. The added bonus: You / your organization get mentioned in the release notes and on the wiki as sponsors. Smile

Cheers

Kristina

4 results