Multi-lingual / func_entries
Posted: Sun Apr 13, 2008 4:45 pm
Cursory search didn't answer this, so here goes:
s9y 1.3 (stock)
entries.tpl:
{if $entry.is_extended}
<div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div>
{/if}
This works for me
- for "normal" entries (default language only)
- multi-lingual entries that do have an extended body for all languages (presumably having one for def-lang will suffice, haven't checked)
It doesn't work for
- default lang has no extended body, other language does have extended body
In the latter case, .is_extended is not set in functions_entries.inc.php as
if (isset($entry['exflag']) && $entry['exflag'] && ($extended || $preview)) {
$entry['is_extended'] = true;
}
fails, specifically the $entry['exflag'] part (isset, but to 0 as opposed to 1).
This seems to be a bug; presence of extended-body should be tested for the selected language (preferred), or a warning should be thrown if a multi-lingual entry is published that has an extended body for one or many languages, but not for the default language.
Besides, it would be kinda nice if we defaulted to the version the user chose in their browser's prefs, which seems to require
else {
$this->showlang=$serendipity['lang']; }
@ serendipity_event_multilingual.php:81 (but maybe I misunderstood the intention/implementation there?)
thanks/regards
-A-
s9y 1.3 (stock)
entries.tpl:
{if $entry.is_extended}
<div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div>
{/if}
This works for me
- for "normal" entries (default language only)
- multi-lingual entries that do have an extended body for all languages (presumably having one for def-lang will suffice, haven't checked)
It doesn't work for
- default lang has no extended body, other language does have extended body
In the latter case, .is_extended is not set in functions_entries.inc.php as
if (isset($entry['exflag']) && $entry['exflag'] && ($extended || $preview)) {
$entry['is_extended'] = true;
}
fails, specifically the $entry['exflag'] part (isset, but to 0 as opposed to 1).
This seems to be a bug; presence of extended-body should be tested for the selected language (preferred), or a warning should be thrown if a multi-lingual entry is published that has an extended body for one or many languages, but not for the default language.
Besides, it would be kinda nice if we defaulted to the version the user chose in their browser's prefs, which seems to require
else {
$this->showlang=$serendipity['lang']; }
@ serendipity_event_multilingual.php:81 (but maybe I misunderstood the intention/implementation there?)
thanks/regards
-A-