Hi.
I'm using s9y in two multi-language blogs, both using it in different ways. I've stumbled over a few questions:
1.) environment 1: http://www.ormus.info/
The blog's primary language is english (about text, sidebar headers etc. are in english). I do however often post german entries. The multi-language plugin is not installed, as I do not want to translate entries.
Now what I would like to have is a button/link, allowing the reader to select to be only shown english or german entries (and of course an option for both languages, which should also be the default). I was thinking about using the CustomFields of the extended entry properties to reflect the entrie's language. Would I be able to submit the filter parameter in the url (like href="index.php?filter=german") to have the entry list filtered by smarty?
2.) environment 2: http://tool.ormus.info/
The site is bilingual, german and english. The multi-language plugin is installed, every content is available for both languages (entries and static pages).
Question #1: How is the rss feed generation handled? Is it language-sensitive, will there be a german and an english rss feed? On a side note: Firefox doesn't like the rss2 feed when I try to add it as an live bookmark, haven't checked the details yet.
Question #2: I would like to show the two most recent entries in the sidebar. And this should be language-aware. I'm pretty sure, that I have to change the recent entries plugin, right? Or is there a way around it (language-specific nugget maybe)? If I have to touch recent entries, is there a function pulling the entry list of a set language from the db?
Thanx for reading...
multi-language, various questions
multi-language, various questions
my installations:
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: multi-language, various questions
Hi!
1.) You cannot do that without the multilingual plugin. And that one only supports to display entries for which a default language PLUS the extra language has been created, I think. It would mean a complete rewrite of the plugin to support otherwise.
You can only use the category system to let visitors click on a category "english" or "german", or use the tagging plugin to tag entries like that so that a visitor can toggle them.
Your approach of entryproperties would mean to create a new plugin that filters entries depending on a property, as this cannot be done generically.
HTH,
Garvin
1.) You cannot do that without the multilingual plugin. And that one only supports to display entries for which a default language PLUS the extra language has been created, I think. It would mean a complete rewrite of the plugin to support otherwise.
You can only use the category system to let visitors click on a category "english" or "german", or use the tagging plugin to tag entries like that so that a visitor can toggle them.
Your approach of entryproperties would mean to create a new plugin that filters entries depending on a property, as this cannot be done generically.
You can append a "?lang=XX" (or was it "?lang_selected=XX"?) parameter to the rss.php feed file to selected the language. By default, the language will be set to the blog'S default language.Question #1: How is the rss feed generation handled? Is it language-sensitive, will there be a german and an english rss feed? On a side note: Firefox doesn't like the rss2 feed when I try to add it as an live bookmark, haven't checked the details yet.
Right, you would need to patch the recent entries plugin. You would need to adapt the queries that the multilingual event plugin issues to selected bodies/extended entries depending on the date. There's no function for it.Question #2: I would like to show the two most recent entries in the sidebar. And this should be language-aware. I'm pretty sure, that I have to change the recent entries plugin, right? Or is there a way around it (language-specific nugget maybe)? If I have to touch recent entries, is there a function pulling the entry list of a set language from the db?
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/
Thank you for your help, Garvin.
I've re-checked environment #1. I've created an custom field from the extended properties plugin (called entry_lang). And added an html nugget containing an html form. The form is http-submitting the selected value.
I can then adjust the entries.tpl with a check like this one:
{if $entry.properties.ep_entry_langr == $smarty.post.language_filter}
Am I thinking wrong somewhere?
I've re-checked environment #1. I've created an custom field from the extended properties plugin (called entry_lang). And added an html nugget containing an html form. The form is http-submitting the selected value.
I can then adjust the entries.tpl with a check like this one:
{if $entry.properties.ep_entry_langr == $smarty.post.language_filter}
Am I thinking wrong somewhere?
my installations:
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
You can do that. However you'll then mess up with the entry count - if you have 15 entries and 14 entries will not match your IF construct, you'll get a page with only 1 entry instead of 15 german entries.
The actual entry filtering would need to be performed in the multilingual event plugin, ini its frontend_fetchentries PHP hook.
HTH,
Garvin
You can do that. However you'll then mess up with the entry count - if you have 15 entries and 14 entries will not match your IF construct, you'll get a page with only 1 entry instead of 15 german entries.
The actual entry filtering would need to be performed in the multilingual event plugin, ini its frontend_fetchentries PHP hook.
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/
The multi-language stuff will be my early death
Talking about http://tool.ormus.info/ :
When I change the language of the frontend with the dropdown list, it's interfering with the backend languages. My default language is german. When I select english for the frontend, then the backend thinks, that english is the default. That really messed with my entries, they know have three language, default, en and de.
I think it because the dropdown list uses the user_language POST variable, while it should use the lang_selected parameter. But I could be way wrong here, Garvin?
*edit* Sorry for the non-sense. The user_language is used by the multilanguage plugin I guess... Still, the problem is, that the language box doesn't change the language of the session, but the default language of the blog...
Talking about http://tool.ormus.info/ :
When I change the language of the frontend with the dropdown list, it's interfering with the backend languages. My default language is german. When I select english for the frontend, then the backend thinks, that english is the default. That really messed with my entries, they know have three language, default, en and de.
I think it because the dropdown list uses the user_language POST variable, while it should use the lang_selected parameter. But I could be way wrong here, Garvin?
*edit* Sorry for the non-sense. The user_language is used by the multilanguage plugin I guess... Still, the problem is, that the language box doesn't change the language of the session, but the default language of the blog...
my installations:
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html