Don't ask to ask, just ask | |
PerlMonks |
Extracting appropriate language text from HTML databy UnderMine (Friar) |
on May 27, 2006 at 20:42 UTC ( [id://552039]=perlquestion: print w/replies, xml ) | Need Help?? |
UnderMine has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I would like your advice on how to store multi-lingual text in some HTML data. Due to other (legacy) constraints I have to fit this into a single database field. My thoughts were along the lines of using XML tags <locale lang="xx"></locale> to mark up the language specific areas. This seems to work ok. The code for processing this to extract a single language also needs to back out to the most appropriate language if the first choice is not available. I have code that works and I have included a sample to show what I mean but it lacks eligence and requires two parse passing of the HTML if the first choice language is unavailable. All suggestions and comments gratefully recieved as this one has me at a loss. Thanks
Back to
Seekers of Perl Wisdom
|
|