Forums / Setup & design / Multilanguage site: exclude pages from a language version

Multilanguage site: exclude pages from a language version

Author Message

Valentina Ferrari

Monday 11 July 2005 2:02:43 am

Hi all!
I have a problem with multilangugae site managment.

I developed my site in two languages: italian and english. I have three pages: "Company", "Portfolio" and "Job opportinities".

I wanna show all these pages in the italian version, BUT I wanna show only two pages ("Company" and "Portfolio") in the english version.

Can I do it? In which way?

Thank you
Valentina

Valentina Ferrari

Tuesday 12 July 2005 12:01:31 am

PLEASE HELP ME!

Matthew Almand

Tuesday 12 July 2005 12:21:50 am

Hi Valentina,

what you want to do is control the display of content through the language. Rather than using the menu directly for Jobs you could create it and link to it manually using:

{section show=eq(ezini('RegionalSettings','Locale'),'ita-IT')}
menu item=jobs
{/section}

that way it only shows this if the language is italian.

Valentina Ferrari

Tuesday 12 July 2005 12:39:13 am

Hi Matthew,
maybe I don't understand what you suggest.

I try to control the menu with:

{section show=eq(ezini('RegionalSettings','Locale'),'ita-IT')}
menu item=jobs
{/section}

but nothing changes.

Infact in my italian siteaccess (called "corporate") I set 'ita-IT' as Locle Regional Settings. So every nodes of the site has this feature.

Right?

Thank you,
Valentina

Matthew Almand

Tuesday 12 July 2005 12:43:56 am

are you curently generating the menu dynamically? if so then you are getting the typical array that loops through the list. Rather than including jobs within this array you remove it from the menu (or hide it by giving the anonymous user limited access to content in that folder, then you setup a manual link in the template "content/view/full/(JOB NODE HERE)" then in the template surround this link with the code above so that the template only shows the content if the regional settings are for Italian. Sorry my PHP isn't good enough to automate the process.

Kai Duebbert

Tuesday 12 July 2005 1:21:45 am

Hi,

You can use the option "only_translated" of the fetch funtion. We use it to only show articles which were translated.

E.g.:

{let articles=fetch('content', 'list',
              hash('parent_node_id', $node.node_id,       
                   'sort_by', array( 'priority', 1),              
                   'class_filter_type',  'include',                 
                   'class_filter_array', array( 'article' ),                   
                   'only_translated', true() ) )
}

[Do something with the articles (e.g. show them or create a menu with them]

{/let}

See also http://ez.no/doc/ez_publish/technical_manual/3_6/reference/modules/content/fetch_functions/list

Kai