Feature description:
For a multilingual page it would be good to have the privacy policy link use the actual translation. If you give a link like node/123 and node 123 is your privacy policy in english language and node 124 is the german translation, then it would be great if the privacy policy link on the german site would use node/124 instead of node/123.

Proposed solution for this:
Add a configuration option for "using translation of privacy policy link". If this option is set then the system will try to get all translations for the privacy policy link and use them appropriately. We can extract the node id from the privacy policy link and then get the translation by using the "tnid" for the privacy policy link node. If translations are found for a specific language, the node id in the privacy policy link gets substituted with translated policy nid.

Requirements:
This in only working if the Content Translation module from core is used and if the privacy policy link is given like node/123. So it works only for translatable nodes. Since the option is disabled by default this should be no issue for sites that do not want to use privacy policy like this. But for multilingual sites using content translation in the way described, this could be an improvement.

So I am kindly asking the maintainer to have a look at this feature request and I will provide a patch.

Comments

stefan.korn created an issue. See original summary.

stefan.korn’s picture

Issue summary: View changes
stefan.korn’s picture

stefan.korn’s picture

Assigned: stefan.korn » Unassigned
Status: Active » Needs review
stefan.korn’s picture

Issue summary: View changes
svenryen’s picture

Hi Stefan! That's a great idea! Thanks!

I had a look at your patch. Looks good. (Just two minor notes about code style: Around . : there should be a space on either side, and the last item in a multiline array should also have a , at the end).

I think it should also be possible to resolve url aliases back to the node/xyz path, so there shouldn't be any need to restrict the entry to 'node/xyz'.

Port to 8.x would need to be made before we can commit this. Are you able to help with that?

stefan.korn’s picture

Assigned: Unassigned » stefan.korn
Status: Needs review » Needs work

Hi Sven,

ok, I will try to port it do D8, fix those minor issues in the patch and include url alias support.

svenryen’s picture

Status: Needs work » Patch (to be ported)

I don't think we will be adding this feature to 7.x. It could be useful for 8.x-2.x if anybody is interested in porting (and improving) the patch.

svenryen’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
svenryen’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev
svenryen’s picture

Status: Patch (to be ported) » Fixed

Tested. Works great. i18n has been revamped in d8, so this doesn't need porting.

  • svenryen committed 0905e8e on 7.x-1.x authored by stefan.korn
    Issue #2972708 by stefan.korn, svenryen: Make privacy policy link use...

Status: Fixed » Closed (fixed)

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