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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Make_privacy_policy_link_use_translation-2972708-003.patch | 2.24 KB | stefan.korn |
Comments
Comment #2
stefan.kornComment #3
stefan.kornComment #4
stefan.kornComment #5
stefan.kornComment #6
svenryen commentedHi 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?
Comment #7
stefan.kornHi Sven,
ok, I will try to port it do D8, fix those minor issues in the patch and include url alias support.
Comment #8
svenryen commentedI 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.
Comment #9
svenryen commentedComment #10
svenryen commentedComment #11
svenryen commentedTested. Works great. i18n has been revamped in d8, so this doesn't need porting.