Hi again,
I want to change the title of a sidebar element (calendar) for a specific language (de) in my template ("amselhof"). I created the file "templates/amselhof/lang_de.inc.php" and "templates/amselhof/UTF-8/lang_de.inc.php" containing the line
@define('CALENDAR', 'Veranstaltungen');
I thought this would make s9y showing "Veranstaltungen" instead of "Kalender" on the sidebar element, but it does not. What's wrong with what I'm doing??
Change language items in template
-
abdussamad
- Regular
- Posts: 117
- Joined: Fri Apr 21, 2006 10:11 pm
- Location: Karachi, Pakistan
- Contact:
You can make the change in the file lang/UTF-8/serendipity_lang_de.inc.php and it will show correctly on all your templates.
Abdussamad
Serendipity templates
Serendipity templates
-
abdussamad
- Regular
- Posts: 117
- Joined: Fri Apr 21, 2006 10:11 pm
- Location: Karachi, Pakistan
- Contact:
Ok i just figured out that if you want to change the title of the calendar plugin for just one template you can do so with this code in the sidebar.tpl file:
Place the above code where the plugin title is displayed. Usually this is after <div class="serendipitySideBarTitle"> .
Code: Select all
{if $lang=="de" and $item.title=="Kalender"}
Verwhatever
{else}
{$item.title}
{/if}
Abdussamad
Serendipity templates
Serendipity templates
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
There is one little problem with language files in your template directory: It cannot "overwrite" the languages defined in your main language file.
To do so, a special variable has been introduced (this slows down the language loading process a bit): You can set $serendipity['useTemplateLanguage'] = true inside the serendipity_config_local.inc.php file and then you are able to overwrite s9y language constants in the language file of your template.
HTH,
Garvin
There is one little problem with language files in your template directory: It cannot "overwrite" the languages defined in your main language file.
To do so, a special variable has been introduced (this slows down the language loading process a bit): You can set $serendipity['useTemplateLanguage'] = true inside the serendipity_config_local.inc.php file and then you are able to overwrite s9y language constants in the language file of your template.
HTH,
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/
# 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/