I finally found the issue.. There is no warning when the config file is not writable. My config file was not writable, so it wasn't working.. I had to use 2 text fields for the last multi-lang proj when I posted the error, but now I can do it the right way.

One of those header warnings in the backend ( the yellow top line ) might be a great way to notify to the user that the preferences could NOT be saved :)

Language Redirect updated to version 1.0.2 on 26th of June 2011

  • Separated language identification from page redirect.

Thanks, @vladG!

Klaftertief, you know ... I'm helping you to help myself :)

Language Redirect updated to version 1.0.3 on 6th of July 2011

  • Changed static method cleanLanguageCodes to non-static in LanguageRedirect class. Thanks, Vlad.

First, thanks much! this is a great extension!

  1. I was curious, is there a way to disable the URL formatting?
    If you see another multi-lingual project I did, it was done before learning about the multi-lingual field/language redirect (selector in footer), it doesn't change the URL, just the content.
    Is that possible?

  2. If the language is set to one that isn't specified in my site can I set a fallback language? Like if a user wants french, but we only have german, english, and spanish, I'd like it to fallback to english. ie. French user sees english page, not just empty content and an fr URL that is unsupported..

Hey @klaftertief, if I wanted to use a GET method for the redirect, would it be as simple as changing this line the the event.php file?

"header(Location: '.$this->_env['param']['root'].'/'.$language_code.'/'.$current_path);"


"header(Location: '.$this->_env['param']['root'].'/'.$current_path.'/?lang='.$language_code);"


I was curious, is there a way to disable the URL formatting?

The extension doesn't support that. You'd have to modify the extension to disable the .htaccess rule and add the $(url-)language parameter differently to the parameter pool. You could do this by changing the name of the cookie in the event to just the __SYM_COOKIE_PREFIX_ because all the values in this cookie get automatically appended to the parameter pool. And to not loose compatibility with the multilingual field and others you probably have to set the language get parameter manually.

If the language is set to one that isn't specified in my site can I set a fallback language?

You could loosen the .htacces rule by either replacing all language codes with a regex to match just any two characters or by adding more language codes. This way a language URL parameter (e.g. fr) gets set, but because it's not in the list of supported languages, the first defined language should act as a fallback.


Hey @klaftertief, if I wanted to use a GET method for the redirect, would it be as simple as changing this line the the event.php file?

Should be. and then you don't need the .htaccess rule, because it maps the first found defined language code at the beginning of the URL as the language GET parameter.

(Sorry for being a bit unclear, I'm just falling asleep.)

It's cool, thanks for confirmation! I could sing you to sleep if you like :)

Thanks much, I think I got it worked out..

If you want to turn my alterations into a preference setting for your extension, that's great too. This was just my quickest fix and I posted so others can grab it too..


I have a big problem when I export an ensemble with this extension enabled. The problem is that the .htaccess file does not contain the redirect ruleset after the ensamble is installed. I use symphony-cms 2.2.1. Is there any solution for this problem or is a symphony bug?


It's an issue. Please post it on GitHub.

For the moment, manually copy the rules from development .htaccess file.

@crstix, I wouldn't say that your issue is something that has to do with the Language Redirect extension. That issue has more to do with the limitations of exporting an ensemble. An ensemble uses the Symphony installer to create files on the server. The .htaccess file is written to the server from the included installer template. If you have made changes to the .htaccess file, these changes will not be included in the ensemble.

Currently, the .htaccess file is assumed to be the same for every Symphony installation, except for the dynamically generated RewriteBase value.

For sites where I have made some major changes to the Symphony .htaccess file, I maintain a private Git repository to track those changes. At the moment, this or manually copying the file is the only way to preserve the .htaccess settings.

How does the Export Ensemble extension handle the settings in 'config.php'? If it preserves custom settings the Language Redirect extension could look for the language setting during installation and create the '.htaccess' rules then.

This discussion seemed more appropriate to the Export Ensemble thread, so I copied some of this discussion there and replied with a possible solution, but it involves some modification to the Export Ensemble extension and the Symphony core.

Does anyone know how to rewrite Nginx rewrites for the Language redirect?

Can language redirect be used to force domain for specific languages?

i.e is there some .htaccess jiggery pokery(magic) that could detect domain and map lang param to that domain?


I have a really small and unimportant bug report. Everything works fine, except for clicking on Lanuage Redirect in the Events Section. When clicking there I get the following error:

URL: http://....../symphony/blueprints/events/info/language_redirect/

Fatal error: Call to a member function generate() on a non-object in /srv/www/htdocs/symphony/content/content.blueprintsevents.php on line 172 

Best regards,


I found a what I think could be a bug in the extension:

when someone types a wrong address before any language code (ex. Symphony trows a Fatal Error.

What is strange is that if the mistake is after an existing page, also without the language code (ex. the 404 page works correctly.

As you might have already guessed I’m not very technical so maybe I’m missing something. How could I fix this?

Which version do you use? Symphony and extension.

@vladG, sorry, I should have mentioned that.

Symphony 2.2.3 and Language Redirect 1.0.3

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details