Gossamer Forum
Home : Products : Links 2.0 : Customization :

Please make LINKS2 work perfectly for Non-english

Quote Reply
Please make LINKS2 work perfectly for Non-english
Hi,
With "Links 2 Non-english Modifications", displaying categories is really good. But categories select box when I add link, still it's english.

Could you help me to make it work?? I looked scripts and I think I have to do somthing in here...

In db_util.pl,

foreach $field (@fields) {
$values{$field} ?
($output .= "<OPTION SELECTED>$field\n") :
($output .= "<OPTION>$field");
}
$output .= "</SELECT>";
return $output;

Output should be something like
"<OPTION VALUE="$field">$Non_Eng_Categories\n" in stead of "<OPTION>$field\n"
But question is how can I generate "$Non_Eng_Categories???

Please give me some idea....
Quote Reply
Re: Please make LINKS2 work perfectly for Non-english In reply to
I think I resolve it.
Since I just start to learn programing specially perl, the code looks not fancy. Please check it out and give me a guide.

I added:
foreach $field (@fields) {
$kategory{$field} = &kategorie_title_mb($field);
}


And changed:
it was...
$values{$field} ?
($output .= "<OPTION SELECTED>$field\n") :
($output .= "<OPTION>$field");

now...
$values{$field} ?
($output .= "<OPTION SELECTED VALUE=\"$field\">$kategory{$field}\n") :
($output .= "<OPTION VALUE=\"$field\">$kategory{$field}");

I saw the silimar question on forum. please give me and them help.
Thanks.
Quote Reply
Re: Please make LINKS2 work perfectly for Non-english In reply to
cgi21, I have the same problem so I tested your solution. It works great for adding (ie non-english categories appear) but when you try to validate the new link you get the following error:

CGI ERROR
==========================================
Error Message : fatal error: Undefined subroutine &main::kategorie_title_mb called at.... admin/db_utils.pl line 190.

My code in sub build_select_field:

foreach $field (@fields) {
$kategory{$field} = &kategorie_title_mb($field);
$values{$field} ?
($output .= "<OPTION SELECTED VALUE=\"$field\">$kategory{$field}\n") :
($output .= "<OPTION VALUE=\"$field\">$kategory{$field}");
}

Any solution?
Quote Reply
Re: Please make LINKS2 work perfectly for Non-english In reply to
Try this way. copy the "sub kategorie_title_mb" routine to db_utils.pl and paste it under "sub build_select_field" routine. And changed subroutine name "kategorie_title_mb" to "kategorie_title_mb1" in both call statement and subroutine.

If I know links better, I might include site_html_templates somewhere to proper work but now I'm just beginner in both program and links2.

I hope it could help. But I cannot guarantee this is perfect since I'm still beginner.
Quote Reply
Re: Please make LINKS2 work perfectly for Non-english In reply to
Great idea!!! It worked perfectly. Thank you very much!!!
Post deleted by C. In reply to

Last edited by:

C.: Sep 4, 2003, 5:21 PM
Post deleted by C. In reply to