Conditional Content

Conditions set according to language codes like "de-DE", "FR", etc.

9 months 3 weeks ago #78085

Herbert Mueller's Avatar Herbert Mueller

Is it possible to set conditions like described in the subject line with Conditional Content?

If not, any hints on how to realise this are welcomed.

Explanation: we use a component which is not able to react on localizations.

9 months 3 weeks ago #78086

Peter van Westen's Avatar Peter van Westen Admin

There are language conditions in Conditional Content.
Just use the editor button to create the correct syntax for the {show} tag.

9 months 3 weeks ago #78088

Herbert Mueller's Avatar Herbert Mueller

yes, that is clear.

using the following syntax

{show countries="de-DE"}
Finden Sie einen Fachhändler in Ihrer Nähe
{show countries="FR"}
Găsește cel mai apropiat magazin
{show-else}
Find the nearest store
{/show}

won't switch to 'german' if the website language of the joomla site to 'de-DE' or to french if set to 'FR' (localized website).

what is wrong?

9 months 3 weeks ago #78090

Peter van Westen's Avatar Peter van Westen Admin

You are now using the Country assignment. You should be using the Language assignment.

9 months 3 weeks ago #78091

Herbert Mueller's Avatar Herbert Mueller

we need to use the country assignments.

with two assignments (de-DE and FR) the syntax is ok, but not with three.

two assignments:
{show languages="de-DE"}Dieser Bereich stellt Ihnen als Benutzer der Webseite von Oeschger Brandschutz AG Informationen zum Download bereit.{show-else}Cette zone vous fournit en tant qu'utilisateur du site Internet de Oeschger fire protection AG des informations à télécharger.{/show}

three assignments:
{show languages="de-DE"}Dieser Bereich stellt Ihnen als Benutzer der Webseite von Oeschger Brandschutz AG Informationen zum Download bereit.{show languages="FR"}Cette zone vous fournit en tant qu'utilisateur du site Internet de Oeschger fire protection AG des informations à télécharger.{show-else}This area provides you as a user of the website of Oeschger fire protection AG information for download.{/show}
{/show}

why?

9 months 3 weeks ago #78092

Herbert Mueller's Avatar Herbert Mueller

this is the only way where three criteria can be assigned (with three {show-else} did not work):

{show languages="de-DE"}
Dieser Bereich stellt Ihnen als Benutzer der Webseite von xyz Informationen zum Download bereit.
{/show}
{show languages="fr-FR"}
Cette zone vous fournit en tant qu'utilisateur du site Internet de xyz des informations à télécharger.
{/show}
{show languages="en-GB"}
This area provides you as a user of the website of xyz information for download.
{/show}

9 months 3 weeks ago #78093

Peter van Westen's Avatar Peter van Westen Admin

Correct, you can not use 3 assignments in one tag group.

You can do this however:

{show languages="de-DE"}
...
{/show}
{show languages="fr-FR"}
...
{/show}
{show languages!="de-DE,fr-FR"}
...
{/show}
Or for the same result:
{show languages="de-DE"}
...
{/show}
{show languages="fr-FR"}
...
{/show}
{hide languages="de-DE,fr-FR"}
...
{/hide}

9 months 3 weeks ago #78095

Herbert Mueller's Avatar Herbert Mueller

interesting input:

{show languages!="de-DE,fr-FR"}
...
{/show}

thanks. solved our issue entirely.