The i18n_selection_mode function is not available on drupal 7 and it's not possible send emails with i18n module enabled

http://drupalcontrib.org/api/drupal/contributions--i18n--i18n.module/fun...

I attach a patch that comment the function until the rewrited code arrives

CommentFileSizeAuthor
simplenews_i18n_selection_mode.patch1.14 KBmordonez

Comments

miro_dietiker’s picture

Title: i18n deprecated function » Replace i18n_selection_mode with new concept
Status: Needs review » Needs work

Committed the quickfix...

We still needs a replacement solution.

simon georges’s picture

Hi,

I just contacted Jose Reyero (main current i18n commiter) about a potential replacement function, his answer is :

The replacement function is i18n_select().
Usage is i18n_select(TRUE) to enable i18n_select(FALSE) to disable.

I'll implement that when I have the time, unless somebody's willing to provide a patch.

berdir’s picture

Need to check this, I have no clue what the old code is supposed to do exactly. The used argument "node" does not exist in the documentation: http://drupalcontrib.org/api/drupal/contributions--i18n--i18n.module/fun...

miro_dietiker’s picture

Note that the selection mode is highly relevant for pluggability.

In a regular situation Drupal has one language per request. With simplenews, the language sometimes is needed to switch to the recipient language instead of the language of the current session.

Regarding pluggability, think about the following case:
If a newsletter contains e.g. nodereferences to nodes and the theming code automatically fetches teasers of those referred nodes, the behaviour of the nodereference field is subject of pluggability. With a translateable nodereference, the system might be able to automatically switch to a translated referred node based on the tnid instead of the direct referenced nid. However the nodereference code only would be able do this while it understands the current recipient language, not the language of the original request.

Also disabling the i18n_selection_mode / i18n_select disables i18n query alters.
Check i18n_select/i18n_select.module in i18n_select_query_node_access_alter()
It reduces node lists to e.g. current languages only which might be wrong as stated above.

Referring back to the original multilanguage support issue
#996392: Multilanguage support

berdir’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.