The i18n node module offer an option (i18n_node_translation_switch) that creates links to translated versions of a node in the target language, on the node translation overview page.

It would be great that such variable is used in the node edit link views handler to reflect such behavior.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

B-Prod’s picture

Status: Active » Needs review
FileSize
905 bytes
tim.plunkett’s picture

Very rarely does views use module_exists for contrib modules (devel and advanced_help).
Couldn't i18n_node just extend views_handler_field_node_link_edit and override render_link()?

dawehner’s picture

Project: Views (for Drupal 7) » Internationalization Views
Component: node data » Code

Let's i18nviews does this.

webflo’s picture

Status: Needs review » Needs work

Please submit a patch against i18nviews 7.x-3.x

B-Prod’s picture

Status: Needs work » Needs review
FileSize
1.42 KB

The attached patch implements such functionality.

This patch may wait for #1551688: Drop 'Switch interface for translating' option (Reconsider) to be eventually fixed, since the 'interface switching' option has been removed from the 2 last i18n releases...

webflo’s picture

Status: Needs review » Needs work

Hmm, includes/i18nviews_handler_field_node_link_edit.inc is missing in your patch.

B-Prod’s picture

Status: Needs work » Needs review
FileSize
3.41 KB

Sorry, forgot to add it into GIT...

B-Prod’s picture

miro_dietiker’s picture

I'm not sure if we should switch the handler.
For most other cases we have announced a separate one.
Note that if other modules try to switch the handler, there's a clash. Extensibility is limited.

B-Prod’s picture

I understand. Here is a patch that does not override the original handler.

Anybody’s picture

Issue summary: View changes

The problem still exists and I think the patch is really important. Does it work for all of you?