Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comments
Comment #1
B-Prod CreditAttribution: B-Prod commentedComment #2
tim.plunkettVery 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()?
Comment #3
dawehnerLet's i18nviews does this.
Comment #4
webflo CreditAttribution: webflo commentedPlease submit a patch against i18nviews 7.x-3.x
Comment #5
B-Prod CreditAttribution: B-Prod commentedThe 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...
Comment #6
webflo CreditAttribution: webflo commentedHmm, includes/i18nviews_handler_field_node_link_edit.inc is missing in your patch.
Comment #7
B-Prod CreditAttribution: B-Prod commentedSorry, forgot to add it into GIT...
Comment #8
B-Prod CreditAttribution: B-Prod commentedThe updated patch.
Comment #9
miro_dietikerI'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.
Comment #10
B-Prod CreditAttribution: B-Prod commentedI understand. Here is a patch that does not override the original handler.
Comment #11
AnybodyThe problem still exists and I think the patch is really important. Does it work for all of you?