I wanted my imported nodes to have a language. So there :)

I thought the 'language' option fit nicely near the existing 'author' option. I'm not commenting on whether these are "Replication Options"... but anyway I really like this 'language' option to be in the import process' "Overrideable profile settings" section because I also need to import a few nodes in different languages.

( in the patch, import_html_ui.inc has an offset of -9 lines compared to the -dev version. )

CommentFileSizeAuthor
#4 723728.4.patch4.35 KBroderik
import_html_language.diff4.38 KBroderik

Comments

dman’s picture

Not an unreasonable idea.
For me, placing it in the overridable section is a bit much, but I see your point.

Were you able to use the meta lang= parameter (or whatever it is in the header) at all? Something like that should be supportable, though it certainly hasn't been tried or tested.
If your source doesn't have that in the first case, that's not going to help ... but I imagine it should be importable somehow.

roderik’s picture

Ah, you're right. That should be included in this patch.
And then a default language option should be added "use meta tag, and fall back to Language Neutral if meta tag not present or if the corresponding language is not enabled in Drupal".

Unfortunately... these tags are not present in the crappy old FrontPage HTML that some site users are about to import. I don't need it.
And my own exposure to XSL libraries, XSLT and 'common practices in HTML headers' is virtually nonexistent :)

So I'm going to hold off on this.
Maybe if someone needs this functionality and has a test case, I will modify the patch. Or that someone can do it her/himself.

P.S. luckily, this option will not show up in the 'overridable section' unless you have selected multilanguage capability on your site :)

dman’s picture

Status: Needs review » Patch (to be ported)

It's OK, if your source doesn't have it, there is no win in adding that support right now. Just thought it was worth looking at.

And if as you say it doesn't show up if you are not using languages, then we are probably good to go.
I'll queue this up for inclusion soon! Thanks.

roderik’s picture

StatusFileSize
new4.35 KB

The patch hasn't made it in yet...

One hunk failed against the latest -dev, so here's a re-roll.

dman’s picture

Status: Patch (to be ported) » Fixed

Yo.
Sorry for the delay, no reason.
I'm active on import_html this week, so I'm folding this in to DEV right now
http://drupal.org/cvs?commit=479044

Good tidy code. right thing done in the right place. fine documentation.
THANKS

Status: Fixed » Closed (fixed)

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