Problem/Motivation
i18n_hreflang module provides its own implementation of the said hook, but only for the front page.
Proposed resolution
Simply reuse the code from the i18n_hreflang module and add an if clause to limit the translation to node paths only (the ones the code it most likely to work correctly). url() function seems to be handling these without any issues.
Remaining tasks
Further review & testing is required to determine whether it work properly for all node paths (the code has so far been tested on both aliased and unaliased paths on a local dev site).
The code could also be expanded to enable entity path translation.
Comments
Comment #2
isakic commentedComment #3
isakic commented0001-Add-hook_i18n_translate_path-for-Entity-Translation-.patch queued for re-testing.
Comment #5
maximilianmikus commentedFixing the patch.
Comment #6
maximilianmikus commentedargh..! had the branches switched up...
Comment #7
plachNot sure how to implement that properly but right now we are supporting only nodes. Moreover, if I understand correctly what the code is trying to achieve, it seems we are not taking into account whether translations are actually available.