Search

@vladG

That's exactly the same combination as I use: Symphony 2.2.3 and Language Redirect 1.0.3

I also found the same issue when someone is trying to access a language that is not available. For example if my website is in Italian and English and the URL points to /fr/, instead of an error-404 I get a symphony error

Does anyone has the same problem? If I’m the only one it must be a problem on my site but I tried to replicate the issue with a fresh installation and it still present the same behavior.

Thank you for your help, Giulio

Hi guys,

sorry for not answering, I was too busy the last weeks. I'll look into the issues this weekend.

Hmm, I was wondering: what's the impact for SEO when using this extension?

For example, some visitors will type www.example.com in browser and will be redirected to www.example.com/en and others will use a search engine to find www.example.com/en or www.example.com.

Does anybody have any idea what's the impact on SEO?

I finally found the solution to my problem and it wasn’t a bug! There was a condition based on the $url-language variable that was not set correctly.

I’m sorry to have wasted your time and thank you again for your help.

Glad it's working. I couldn't recreate your issue didn't find the time too further look into it.

Jonas, is there scope to have the redirect URL only happen on the !default language? as in if your default language is English, the script does not need to redirect to domain.com/en/ but if the second/third/fourth etc... is detected the redirect would kick in and would redirect to the alternative languages? Just a thought?

Aha! I knew someone would one day ask this question, and I have previously prepared a response! (That I told Jonas about at Symposium...)

The answer is no, with this extension at least.

With the URL Router on the other hand, the answer is yes. Using this instead of the redirect extension will get you where you want to be:

//([a-z]{2})-([a-z]{2})(/[a-zA-Z0-9]+/?)?
/$3/?language=$1&region=$2

Obviously doing this will lose all the other great features of Language Redirect, like browser language detection and cookies...

Ahh I see :) Thanks for explaining John, It's just an aesthetic thing at the moment and I'm tinkering with the extension to check an if else statement for $available_languages[0] sort of thing, but hadn't thought about the cookie side of things.. bugger, arse, boobs. :(

On the other hand, URL router to the rescue! thanks mate, will take a stab at this approach for a really simple entry based site...

I'm using this plugin, and yesterday I had some problems. While using Chrome/MacOSX, I detected that I was not been redirected, thus I was getting an error saying the variable url-language was not defined. I tested in other browsers/SOs, and everything was working fine. So I used the "Clear browsing data" and it started working again in Chrome/MacOSX.

I have no idea of what caused the problem (if it was a bug in the plugin, in Chrome or somewhere else), but I though that I could at least avoid the error if the url-language always had a value (it would have the first language by default), even if the redirect fails, and the URL didn't have a language code. Is it possible to do this change in the plugin? Which files would I have to change to do this?

[...] but I though that I could at least avoid the error if the url-language always had a value [...]

The Language Redirect extension doesn't set the url-languaga parameter by itself but via an additional .htaccess rule. The rule maps the first part of the url, e.g. /en/, to a normal get parameter ?language=en. Symphony then automatically adds the url-language parameter to the parameter pool.

When you need the parameter on a language-unaware page, you can just define it in you template like

<xsl:param name="supported-languages" select="'en'"/>

or

<xsl:param name="supported-languages" select="/data/events/language-redirect/supported-languages/item[1]/@handle"/>

For the latter you could use the Available Languages extension which adds the languages defined in the Language Redirect settings via an event to the page XML without redirecting.

The problem is that sometimes the language redirection (e.g., from / to /en/) fails. So, the problem is in the language-aware pages (not in the language-unware pages).

Nevertheless, I added the line <xsl:param name="url-language" select="'en'"/> to my pages, and it seems that the problem is solved.

Thanks.

Having an error with the redirecting ..

I put in

domain.com/de/

and it works fine, but when i put in

domain.com/es/

it redirects to

domain.com/de/es/

How to I have it realize what's going on?
I have es and de in the language_codes

Perhaps, for some reason, es is missing from your .htaccess. Make sure it looks like this:

### LANGUAGE REDIRECT RULES start
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(de|es|fr)-?()?/(.*/?)$ index.php?language=$1&region=$2&symphony-page=$3&%{QUERY_STRING} [L]
### LANGUAGE REDIRECT RULES end

Thanks for the lead, I think it's part of another problem ..

Whenever I save the Language Redirect preference it fails.
It says it successfully saved, but doesn't change anything.

http://see.weareinto.com/BRZT

Is your htaccess writable?

Yes

Is the config file also writable? I've re-read that you said config...

When I work on my local server I give everything write permissions.

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