eZ Community » Forums » Install & configuration » ShowUntranslatedObjects overrules...

ShowUntranslatedObjects overrules fetch(only_translated)

ShowUntranslatedObjects overrules fetch(only_translated)

Saturday 13 May 2006 5:37:39 pm - 2 replies

After upgrading to 3.8 I have this problem:
The setting


in site.ini.append.php seems to override the value of only_translated in a fetch(content, list/tree) function. Setting only_translated to true() or false() has no effect at all.
Is this intended behaviour or a bug?

Sunday 14 May 2006 3:18:56 pm

After reading this article about the new language model of 3.8
I understand why my fetch funtions behave differently. It says:

"The existing parameters only_translated and language to the fetch functions content/list, content/tree, content/list_count and content/tree_count are deprecated since they are not valid anymore."

Still, this presents with me with several problems. For my multilingual site, I have the following requirements:

1. Articles are written/translated in one or more languages. On various index pages on my site, I only want to list those articles which are available in the language of the site access.

2. For each article, I want to provide links to the available other languages of that same article, if any. Following this link would show the same node in a different language ie. site access.

3. Articles can have related content, such as maps and images, which are created in one language and not translated, but still need to be shown next to the article in another language.

If I set ShowUntranslatedObjects=disabled, 1 is fulfilled, but not 2 and 3:
The contentobject attribute 'available_languages' does not contain the other languages of my object, even though they do exist. Related objects in another language are not shown.

If I set ShowUntranslatedObjects=enabled, 2 and 3 are fulfilled, but not 1:
Object are fetched in any language. The parameter only_translated=true() has no effect. I could use the 'language' parameter to limit the fetch to only one language, but then I have to find out the locale of the site access somehow.
The documentation article is a bit unclear about this. In the quote above it says that also the 'language' parameter is deprecated and no longer valid, but in the paragraph before that is says:
"The fetch function has a parameter called language which is an array of languages to act as the priority list (instead of the one defined in site-access)."

Sunday 14 May 2006 8:47:30 pm

After experimenting a bit with ShowUntranslatedObjects and SiteLanguageList settings, I observe the following:
If ShowUntranslatedObjects=disabled, $node.object.available_languages contains only those languages which are in SiteLanguageList *and* are actually available as translated objects.

Modified on Sunday 14 May 2006 11:44:01 pm by Marc Boon


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from