This topic is locked
[SOLVED]

 Hide a column depending the language

9/17/2010 8:52:23 AM
PHPRunner General questions
N
netmedia59 author

Hello Forum,
Is there a way to hide a column in a list depending the language
For example, if French Language is selected "($_SESSION["langue"]=="French")" I want to hide the column "UK" in the list

If English Language is selected "($_SESSION["langue"]=="English")", I want to hide the column "FR" in the list

Thanks very much
Olivier

Lille (FRANCE)

A
ann 9/21/2010

Olivier,
here is a sample code for the List page: Before display event on the Events tab to hide 'Fr' column:

if ($_REQUEST["language"]=="English"){

$xt->assign("FR_fieldheadercolumn",false);

$xt->assign("FR_fieldcolumn",false);

}

...
N
netmedia59 author 9/23/2010

Hey Ann,
Thanks very much

It works as expected

I had to add one more variable :
global $xt;

if ($_REQUEST["language"]=="English"){

$xt->assign("FR_fieldheadercolumn",false);

$xt->assign("FR_fieldheader",false);

$xt->assign("FR_fieldcolumn",false);

}
That's going to help me (and others) to build multi-languages projects.

Thanks again !
Olivier



Olivier,
here is a sample code for the List page: Before display event on the Events tab to hide 'Fr' column:

if ($_REQUEST["language"]=="English"){

$xt->assign("FR_fieldheadercolumn",false);

$xt->assign("FR_fieldcolumn",false);

}

...


N
netmedia59 author 9/23/2010

Hey,
In fact, I was too fast, it's OK of the field is empty but not OK if there is a value in it ?

Thanks for an issue ?
Olivier

A
ann 9/24/2010

Olivier,
I'm not sure that I fully understand your point.

Please re-phrase it.

Maybe screenshot or two can help.