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');
  if ($result=="en-GB") {
      header('Location: /index.php?option=com_content&view=article&id=3415');

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:

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)