Hello,
I'm just constructing a trial Piwigo site (so I can't publish the URL) which is subsidiary to another site (the 'main' site). I would like simple link as the first item in the main menu (to the left of "Albums") which has the text "Return to Main Site".
I can see how to do this by editing file 'local/config/config.inc.php' and setting $conf['links'] = .......
However I would like the text and URL to be different according to the user's language setting (German or English in this site).
Can anyone advise how best to do this please?
I have tried using Advanced Menu Manager but that only seems to work if I have a sub-menu, which I don't want.
Many thanks in advance
Paul
Environment:
Piwigo 11.5.0
Operating system: Linux
PHP: 7.4.19
MySQL: 5.5.5-10.5.11-MariaDB-1:10.5.11+maria~focal-log
Graphics Library: ImageMagick 6.9.10-23
Offline
Looking further into this, the following seems to work in 'local/config/config.inc.php':
<?php
$conf['links'] = array(
'<German link>' => array('label' => '<German label>', 'new_window' => false, 'eval_visible' => 'return (substr($user[\'language\'], 0, 2) == "de");'),
'<English link>' => array('label' => '<English label>', 'new_window' => false, 'eval_visible' => 'return (substr($user[\'language\'], 0, 2) == "en");'),
);
?>
Is there a better way?
Offline