Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Non-English Categories Modification

Quote Reply
Non-English Categories Modification
Hi,
I think I am not the one who are waiting for optional "String"/"And" search routine in LinksSQL, but I am willing to wait for alex to produce this new LinksSQL version.

However, I have a question about non-english categories. Is it possible to add field Non-English Catname in categories table.

e.g.
URL-Categories: Arts/Painting/England
Non-English Catname: ZZZ/RRR/QQQ

Then it can show on the html or search result that Catgories html in:
<a href="http://www.yourdomain.com/links/Arts">ZZZ</a> : <a href="http://www.yourdomain.com/links/Arts/Painting">RRR</a> : <a href="http://www.yourdomain.com/links/Arts/Painting/England">QQQ</a>

Also, when people Search "QQQ" or "England" also get the same result of categories and links.

Is it possible? Anyone can make this modification? Hope that it can be one of the new feature in the next LinksSQL version!!

Thanks Alex and all who have participated in LinksSQL, It is really great!!
Quote Reply
Re: Non-English Categories Modification In reply to
It shouldn't be too hard to do. Add a new field called 'English_Directory' for instance, then you need to edit:

sub build_clean_name

in DB_Utils. You'll need to change:

$id = &get_category_id ($tmp);

and instead, lookup English_Directory using $tmp.

Cheers,

Alex
Quote Reply
Re: Non-English Categories Modification In reply to
Hi,

I'm not sure I get what you are asking, but I'll take a stab at it, since I've been hacking away at this for awhile.

The problem is sorting/searching on the non-English characters, for the reasons Alex has listed.

What I think you are asking is if you can have a record structure:

Code:
%db_def = (
ID => ['1', 'INT', '10', '20', '1', '0', '^\d*\.?\d*$'],
Name => ['2', 'CHAR', '40', '255', '1', '', '', '3'],
Description => ['3', 'CHAR', '40x3', '5000', '0', '', '', '1'],
Non_English_Name => ['2', 'CHAR', '40', '255', '1', '', '', '3'],
Non_English_Description => ['3', 'CHAR', '40x3', '5000', '0', '', '', '1'],
....
);

So that the category is listed in English and non-English?

Are your links going to be in English and non-English also?

If you do it the way it is above, you can set your templates up to use either English or non_English, and with Alex's planned template sets, you might be able to let a person select their language, then view the files in that language.

It might require separate builds, passing a parameter to the nph-build routine for which template set to use, but depending on how the new template-sets mod is designed, it should be possible.

At least with the search.cgi it would be...

Let me know if I understand what you are asking correctly, and maybe Alex can let us know if the new mod will allow this to be done easily Smile

Quote Reply
Re: Non-English Categories Modification In reply to
  Thanks for your concern!
Sorry for my poor english!
Now non-english categories mod is using CatID as URL, e.g. http://www.yourdomain.com/1/12/34/678/990/index.html, but display the HTML of cat title is
<a href="http://www.yourdomain.com/1/12/34/678/990/index.html>XXX : YYY : ZZZ : RRR : KKK</a>

where 1 is catid of XXX (non-english category), and 12 is catid of YYY ... etc...

Now my question/proposal is I want use the english of XXX in url instead of its CatID.

e.g.
Arts is the english of XXX
Painting is the english of YYY

Then I want the Url is Arts/Painting but the display is still YYY when showing categories in anywhere!

hope this is better question!
:>