Page 1 of 1

Multilingual blog titles

Posted: Tue Jul 26, 2005 2:40 pm
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?

Re: Multilingual blog titles

Posted: Tue Jul 26, 2005 11:24 pm
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

Posted: Wed Jul 27, 2005 12:52 pm
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!