Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't detect and redirect language by default #10

Open
jensscherbl opened this issue Sep 19, 2014 · 2 comments
Open

Don't detect and redirect language by default #10

jensscherbl opened this issue Sep 19, 2014 · 2 comments

Comments

@jensscherbl
Copy link
Contributor

Hey @Cinamonas,

I agree with your changes here, that's already on my todo list as well.

According to semantic versioning, new version should be 2.0.0 though, since this is a breaking change.

@jensscherbl jensscherbl self-assigned this Sep 19, 2014
@jensscherbl jensscherbl added this to the 2.0.0 milestone Sep 19, 2014
@jensscherbl jensscherbl changed the title Don't detect and redirect language by default. Don't detect and redirect language by default Sep 19, 2014
@Cinamonas
Copy link

Oh yeah, it was a temporary a quick and dirty solution ;) Nice to hear that you plan to implement it 👍

@twiro twiro self-assigned this Feb 28, 2017
@twiro
Copy link
Owner

twiro commented Mar 5, 2017

My plan for the major update I'm currently working on is to no more force redirecting (if no valid langauge is detected) - instead the extension will offer the following configuration-options to control redirection behaviour:

  1. Never redirect
  2. Only redirect if a matching language is found
  3. Always redirect

While option 1 and 3 are pretty self-explanatory option 2 is easier to understand when having a look at the upcoming "language-detection-stack" explained here. Choosing this option means the following:

If no distinct valid frontend language-code was detected in the URL (either as query string, in the path or by domain-mapping) the extension will try to find a matching language elsewhere. There are two methods (cookie and browser settings) that could deliver a matching language and having selected option 2 simply means that a redirect will only happen if one of these methods returns a matching language. Meaning that visitors, that don't seem to accept any of the offered languages could be offered a list of all available languages instead of simply redirecting them to the default language.


Another configuration-setting I plan to offer is the way how redirecting happens. According to the different url-structures explained in the language-detection-stack it makes only sense to support all 3 of them:

  1. domain.tld → domain.tld/xy/
  2. domain.tld → domain.tld?language=xy
  3. domain.tld → domain.xy

While options 1 and 2 will simply work out of the box option 3 will require another step - setting up your own domain-language-mapping. For a better understanding what that's about I'll simply include a preview-screenshot of the current state of version 2's configuration-settings:

Preview of the enhanced configuration settings:

bildschirmfoto 2017-03-05 um 19 11 57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants