in Joomla Templates by beheer (160 points)
For SEO I need personalised error404 pages for all languages in my multilingual site. I have added the following code to error.php in the template map:

$lang = JFactory::getLanguage();

$result = $lang->getTag();

if (($this->error->getCode()) == '404') {

  if ($result=="nl-NL") {
      header('Location: /index.php?option=com_content&view=article&id=3415');
      exit;
  }
  if ($result=="en-GB") {
      header('Location: /index.php?option=com_content&view=article&id=3415');
      exit;
  }

However only the default language gives the right result. Please tell me what to change

1 Answer

by lisa-west (32.1k points)

To create a custom 404 page for a multilingual site, please refer to the following link: https://forum.joomla.org/viewtopic.php?t=749158

Interested in localizing/Translating TemplateToaster Software in your native language in exchange of a Pro License ? Contact Us

---------------------------
Download TemplateToaster v8 Beta (What's New)
...