Input requested from MultiLink users

Events happening in the community are now at Drupal community events on www.drupal.org.
andy inman's picture

This post relates to MultiLink and more specifically to the issue at http://drupal.org/node/796822

As I'm trying to plan a D7 version and would like to finalise functionality, I'd like to get some input from users here (rather than the issue queue, so as to reach a wider audience and maybe use a poll here.)

So, the big issue is to establish the "correct" way sending the user to a suitable page, considering both site language and content language, and trying to choose the "best" combination based on user language preferences.

I'll try to choose meaningful names for the two languages we deal with:

PCL - Preferred Content Language - the language of the content (typically a node) which ML will link to (or redirect) to.
PSL - Preferred Site Language - the language for the site user interface (menus, login form, etc.)

So, in general ML will link/redirect to: www.site.com/PSL/node/123 - where node/123 is in language PCL.

A couple of "rules":

  1. ML should never change PSL. The only time PSL should change is when the user specifically requests a different language (e.g. via a "language switcher" menu/block.) Provide exceptions for special roles (admins, translation staff.)

  2. ML should respect user's language preferences (multiple) from the Browser when choosing PCL. So in general, link/redirect to content in the first preferred language (if available, but if not, second preferred language, etc.)

External links

One question is what to do when the user arrives at the site from an external link. We can detect an external link by looking at the HTTP referrer.

  • So, let's say the user found on Google: www.site.com/en/node/123 ... but preferred language (from browser) is French and node/123 has a French translation at node/124. Should ML-Redirect send them to fr/node/124 ? That is what would happen with the current version, but it breaks rule (1) above - we should display a message asking the user to confirm that they want to switch to French.

  • Similarly, if node/123 is not available in French, we can redirect to fr/node/123 (i.e. site in French, content in English) but again should get confirmation from the user.

Internal links

Should behaviour be any different when dealing with internal links? Links generated with ML should already be ·"correct", but some pages may display links such as en/node/123 which ML-Redirect thinks should go to fr/node/123 or fr/node/124. Maybe ML should never redirect internal links? Or again, get confirmation from the user.

So, a message to get confirmation from the user should help in many cases. However, it might start to get annoying if it appears too often. This could be solved by a "always do this (don't ask again)" option, set for the current session.

Ok, these are all just thoughts and ideas, not a plan - I welcome further input.

Comments

I don't think multilink

jose reyero's picture

I don't think multilink should be doing any redirection at all. For external links if a page is found in a search engine, the text searched for is not necessarily the node text, and that may break consistency with search engine results.

As for internal links, if I understand it well, we'll be producing updated links depending on existing translations so the right consistent strategy here may be refreshing the cached content and producing the right link, again not doing any redirection.

Btw there's an i18n module (i18n_redirect) that does something like that redirecting but only for anonymous users (search engines). I think that should work good enough for updated pages that just got a translation. Still, the idea is to wait for the search engine to update its content and links, instead of just redirecting on the fly.

Redirect is optional

andy inman's picture

Thanks for the input, Jose. Multilink's redirection functionality is a separate module and so entirely optional. If it's not activated, no redirection is performed.



Currently part of the team at https://lastcallmedia.com in a senior Drupal specialist role.

MultiLink release 2.5

andy inman's picture

Version 2.5 is now available here. It adds the following features:

  • When the user deliberately switches language (e.g. using Drupal's standard language switcher block) the newly selected language is regarded as the user's preferred language for the rest of the session.

  • Language order of preference can be set in settings.php - see the relevant section of the documentation page.



Currently part of the team at https://lastcallmedia.com in a senior Drupal specialist role.

Internationalization

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: