Multilingual blog titles

Creating and modifying plugins.
Post Reply
randulo
Regular
Posts: 141
Joined: Thu Jul 21, 2005 10:28 am

Multilingual blog titles

Post by randulo »

I need to change the name of the blog per language. I see there is a plugin to change the header image, serendipity_event_kubrickheader
but I'd like to make the header image different for each langage.

Maybe there is a way to extend the current plugin? If not, how can this be done?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Multilingual blog titles

Post by garvinhicking »

Inside templates you can check it easily if you create a config.inc.php file in your template:

Code: Select all

<?php
$serendipity['smarty']->assign('serendipity', $serendipity);
?>
In your template you can then do:

Code: Select all

{if $serendipity.lang == 'de'}
Deutsch!
{else}
Different.
{/if}
Extending plugins is also possible, there you can just check $serendipity['lang'].

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
randulo
Regular
Posts: 141
Joined: Thu Jul 21, 2005 10:28 am

Post by randulo »

Thanks for that info!

Using your kubrik_ plugin as a base, I managed to modify the CSS #header per language to change the background images. This looks better than changing the text because it gives more freedom, but the disadvantage is that many browsers cache the CSS, so the image doesn't always change on first display. I can live with this.

I think the "problem" with the multilangauge implimentation is the plugins that are not aware of it :) Still now that it's working, it's one of the top features of serendipity IMO!
Post Reply