Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

2 languages simultaneously & importing text database.

Quote Reply
2 languages simultaneously & importing text database.
Hi

I'm currently fiddling around with Link2 and I am looking to purchase a Links SQL.

It will actually need some heavy modifications, as each entry will have duplicate information for it. One set od descriptions, title, etc. in Welsh and one set in English. I will also need to add an extra tag at the end of each url, something like lang=welsh or lang=english to bring up the correct information too.

Now for the importing directories bit. I have a folder with 400 odd text files in it. Each text file is a record, and they are stored as their ID number, from 1-400. The text files are deliminated by a | and I will need to import all of these into Links SQL.

How easy would it be to do the above? I am assmuing people have imported similar databases a hundred times over and that would be OK. But my real problem is how to store duplicate information for each record in two different languages and to be able to access this information. Has anyone had any experience with this? And if not, how easy a hack would this be?

Thanks for your help!

- wil

Last edited by:

Wil: Mar 5, 2002, 9:08 AM
Quote Reply
Re: [Wil] 2 languages simultaneously & importing text database. In reply to
Hi,

We do have a multi lingual plugin available that does what you need. Contact Jack at info@gossamer-threads.com for details.

As for the import, you would need to write something custom to do it. Links SQL only has support for importing records from a single file (so you could do it 400 times, but it would probably be easier to write a program to do it as I know you are familiar with perl).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] 2 languages simultaneously & importing text database. In reply to
Alex

That's excellent news. I'll fire off an email to him right away. If this works as expected, I will be more than happy!

As for importing old records, this shouldn't be a problem either. I can knock something together that will do that for me preety quick.

Thanks for your help.

- wil
Quote Reply
Re: [Wil] 2 languages simultaneously & importing text database. In reply to
Ugh! This is driving me crazy!

I'm trying to import all my records into Links, and this is proving to be a right nightmare. I originally wrote my code & flat-file database system over two years ago now, and consistency is one word that was not in my vocabulary back then!

Looks like I will have to insert at least 80 of my records manually, and there are 27 fields for each record. Very ugly.

Serves me right for not making the initial investment, huh? :-)

Just for a laugh, here's a snippet of my original code to write data about a record to a file. This is just crazy! :-)

Code:
open (DB1,">>$E_DATA_DIR/$A::dat_id.db");
print DB1 ("$A::dat_id");
print DB1 ("|");
print DB1 ("$A::e_dat_name");
print DB1 ("|");
print DB1 ("$A::e_dat_url");
print DB1 ("|");
print DB1 ("$A::e_dat_key");
print DB1 ("|");
print DB1 ("$A::dat_lang");
print DB1 ("|");
print DB1 ("$A::dat_date");
print DB1 ("|");
print DB1 ("$A::dat_new");
print DB1 ("|");
print DB1 ("$A::dat_star");
print DB1 ("|");
print DB1 ("$A::dat_hits");
print DB1 ("|");
foreach $agegroups (@A::dat_age) {
print DB1 ("$agegroups ");
}
print DB1 ("|");

print DB1 ("$A::e_dat_edit1");
print DB1 ("|");
foreach $cat1 (@A::dat_cat1) {
print DB1 ("$cat1 ");
}
print DB1 ("|");

print DB1 ("$A::e_dat_edit2");
print DB1 ("|");
foreach $cat2 (@A::dat_cat2) {
print DB1 ("$cat2 ");
}
print DB1 ("|");

print DB1 ("$A::e_dat_edit3");
print DB1 ("|");
foreach $cat3 (@A::dat_cat3) {
print DB1 ("$cat3 ");
}
print DB1 ("|");
foreach $sub_cat3 (@A::dat_sub_cat3) {
print DB1 ("$sub_cat3 ");
}
print DB1 ("|");

print DB1 ("$A::e_dat_edit4");
print DB1 ("|");
foreach $cat4 (@A::dat_cat4) {
print DB1 ("$cat4 ");
}
print DB1 ("|");
foreach $sub_cat4 (@A::dat_sub_cat4) {
print DB1 ("$sub_cat4 ");
}
print DB1 ("|");

print DB1 ("$A::e_dat_edit5");
print DB1 ("|");
foreach $cat5 (@A::dat_cat5) {
print DB1 ("$cat5 ");
}
print DB1 ("|");
foreach $sub_cat5 (@A::dat_sub_cat5) {
print DB1 ("$sub_cat5 ");
}
print DB1 ("\n");
close (DB1);

What was I thinking?!

- wil

Last edited by:

Wil: Mar 11, 2002, 11:08 AM
Quote Reply
Re: [Wil] 2 languages simultaneously & importing text database. In reply to
A couple of words spring to mind :)