There is useful feature for really multilingual sites. To set feed language on creating feedapi_node in feed items nodes automatically. I'll try to modify the feed_inherit module, but... :)
And sorry for my bad English. :)

Comments

alex_b’s picture

Based on what information would you set the language?

drq’s picture

Based on information from language settings of parent feedapi_node.
For example, if I've set Chinese language on feedapi_node creation then all nodes from feed must become Chinese too. And they became "Language neutral" in actual fact.

SqyD’s picture

StatusFileSize
new2.6 KB

I've created a patch for the 6.x-1.2 version of feedapi_inherit.module that implements this feature:

Functionality:
When enabled in the feeds settings the language of the feed_node will get passed onto all feed_items

Disclaimer: This is my first patch submission so please let me know if I screwed up anything. It seems to be working just fine on my site, I hope it will work for others.

Cheers!

Paul K

drq’s picture

Thanks. I'll try it and report.

Anonymous’s picture

I tried it here. I can see the checkboxes to enable the language. The patch is installed (as far as I can see) but it is unfortunately not passing the language parameters on to the nodes. Is there anything I should set-up additionally (weights for example)?

buzink’s picture

hi SqyD,

Great work, gonna test it. I am reworking your patch for feedapi 5 and looked closely at it.

Should

$inherit_og = $feed_node->feed->settings['processors']['feedapi_inherit']['inherit_language'];

not be

$inherit_language = $feed_node->feed->settings['processors']['feedapi_inherit']['inherit_language'];

Maybe this is also your problem, Designer?

buzink’s picture

In addition to my previous comment

if ($inherit_language && module_exists('translation')) {

should be

if ($inherit_translation && module_exists('translation')) {

buzink’s picture

Version: 6.x-1.x-dev » 5.x-1.x-dev
StatusFileSize
new4.65 KB

The attached file should work for feedapi & drupal5.

Backup the old modules/feedapi/feedapi_inherit/feedapi_inherit.module file and overwrite with this one.

buzink’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
StatusFileSize
new2.68 KB

Attached is an updated patch for feedapi & drupal 6. Not tested, but should work.

SqyD’s picture

Hey buzink,

Thanks for the review and the fixes. I will test them over the weekend.
[Update]: I tested both 5.x and 6.x versions and all seems to work perfectly now, Thanx!

Sorry for the mess all. I haven't been looking at the test site I was using this module in for some time and noticed it didn't work anymore for me too. I think I messed up uploading the submitted version and got bitten by some caching problem since the checks and prefs (that included the errors you found) I added later then the actual logic that was still creating language enabled nodes...

SqyD’s picture

Status: Active » Reviewed & tested by the community

I patched the current release today with the patch buzzink posted before and everything is still working smooth. I recommend merging this into the next release.

andrewsuth’s picture

Version: 6.x-1.x-dev » 6.x-1.6
Component: Code » Code feedapi_inherit

I think this functionality is great, it would greatly enhance those aggregating multilingual feeds.

I installed the latest version of the module and I did not find this functionality. Is there a plan to include it in an upcoming release?

alex_b’s picture

Version: 6.x-1.6 » 6.x-1.x-dev

This is RTBC from my point of view. Let's remove the stray empty line when committing.

aron novak’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for the work!

Status: Fixed » Closed (fixed)

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