Content profile allows a content profile node to have translations nodes in the translation set. I'd like it to display (teaser, full node or link to) the correct translation when the language is changed.
I find that the attached patch does the job, but I realise that more work may be needed. (I have little knowledge of how cache works exactly and why there was a need for content_profile_load() function).
| Comment | File | Size | Author |
|---|---|---|---|
| content_profile.module.show_translations.patch | 872 bytes | vitalie |
Comments
Comment #1
fagoplease make sure to obey the drupal code style. Perhaps it would make sense to add the translation as parameter to the load function? If it's left to the default (e.g. NULL) we can use the current language as you did.
The load function does caching as node_load doesn't in this case.
Comment #2
fagoComment #3
waddles commentedI don't know about the need to pass the language in as a parameter, but that patch works for me :)
Thanks Vitalie, I really needed that.
Comment #4
fagoI had a look at the patch and overhauled it - so there is only one node_load() needed in any case. I've also add the language as another optional parameter. Then I optimised content_profile_load() a bit and added doxygen comments for it.
Comment #5
fagoah yes, committed to 6.x-1.x-dev!