Dev version from 2013-Sep-30, I find that add translation links are not shown for languages that the current user has access to translate. Has anybody else seen this?
Here are my notes from investigation:
#### Conclusion
The function *i18n_access_translation_node_overview()* uses if (node_access('create', $node)) to determine if the link to create a translation should be shown. But, later *i18n_access_node_access* as a hook, via *node_access()*. At that point the *$node* object parameter is the original untranslated node, and the access check is performed based on the language of that original node, *not* the language to be translated into. The result: the access check returns *no access* and so the translation link is not displayed.
Simple solution: Bypass the check. There are further checks to ensure that the user has access to create nodes at all, and whether they have access to the relevant language for the link to display. So, as far as I can see this will have no adverse effects. So, removed if (node_access('create', $node)) { ...
I also tried leaving that check in, but prior to it setting $node->language = $langcode. I would have expected that to work, but it doesn't and I can't see any reasonably obvious reason as to why not.
----------------------------
Comments
Comment #2
darren oh