Is it possible to use [tnid] instead of [nid] in automatic aliases?
(The point is to achieve language-symmetrical aliases for translated nodes: while [nid] is different for each node, [tnid] should be identical for the source node and its translations into other languages, so that the paths would be lang1/smth/tnid, lang2/smth/tnid instead of lang1/smth/nid1 and lang2/smth/nid2).
Does it depend on pathauto or on the token module?
Or maybe somebody knows a different technique to achieve language-symmetrical URLs?
(I understand that tnid may not always be defined at the moment of node creation).

Thank you!

Comments

greggles’s picture

Title: Can tnid number be used in the path? » Provide tnid number token (nid of the "source node" and translations
Project: Pathauto » Token
Version: 6.x-1.1 » 6.x-1.x-dev

Interesting idea. Thanks for creating the feature request.

This would be done in token.

You can create language "symmetric" urls by not using the nid in the URL, but if you really want to have the nid in the url then this new tnid will need to be added to token.

GN’s picture

Thank you!
I don't really need nid in the URL - I need anything that could generate identical (and not too ugly :)) URLs for translations of a source node into other languages, and I believe tnid is the only parameter that connects translations to each other directly.
Of course it's possible to match the URLs manually, or to create for technical needs an extra content field "article number," "newsletter number" or so, which should be the same for translated nodes -- but this field should also be set manually. Or set automatically for the source node (e.g. depending on the timestamp or any other unique value), and then inherited by translated nodes... Seems to be possible, but somewhat complicated.

Dave Reid’s picture

Status: Active » Closed (duplicate)

Marking this as a duplicate of #736178: Add a [node:source] token for source node of a translated node since there was more work done recently there.