You are here:  » Multi-language site feed import problem

Support Forum



Multi-language site feed import problem

Submitted by johan_norlund on Mon, 2007-04-02 21:37 in

Hello David!

Perhaps this is a bit overkill, but I'll give it a shot.

I'm creating a multi-lingual site for a client, but to avoid duplicating all the files for each language I'm using domain aliases (.en and .it for english and italian version sites) and extract the "en" and "it" into a PHP variable that I then can use to call the translate.php files (I made two. translate.php and translate_it.php. When a user visits it.website.com the translate_it.php is called).

It works wonderfully! BUT, I also want to use the technique so that different feed folders are used depending on which "fake" subdomain that is visited. I created an extra feed folder (feeds_it), duplicated all database tables and renamed the new ones to "pt__itproducts" "pt__itfeeds" (double underlines) etc, and modified config.php so that different table prefixes are used depending on which language that is used.

$config_databaseTablePrefix = "pt_".$lang;

I've also modified feeds_register_step1.php and feeds_register_step2.php so that the correct feed folder is used.

There:) Now I can put the italian feeds into the "feeds_it" folder and the english feeds into "feeds" and handle them separately through http://it.site.com/admin/ and http://en.site.com/admin/.

The feed registration works like a treat, but when I try to import the products on the Italian version site, only the "imported" date is updated. No products are imported into the database.

Any clues? ;) In worst case, I'll have to duplicate everything and make real subdomains but it would be cool to keep the site light using this neat trick:)

http://mp3boss.boomboom.se (test server)

Submitted by support on Tue, 2007-04-03 06:49

Hi,

You mentioned that you have modified feeds_register_*, however you didn't mention includes/admin.php which would also need modification in this case as the following line (393) references the feeds directory:

MagicParser_parse("../feeds/".$admin_importFeed["filename"],"admin__importRecordHandler",$admin_importFeed["format"]);

Hope this helps!
Cheers,
David.