Gossamer Forum
Home : Products : Links 2.0 : Discussions :

nonenglish mod

Quote Reply
nonenglish mod
A previous question/problem, that didn't get any answer. I have the same problem (but with Swedish language). Anyone...?


I'm using the non-english mod and there is one problem dispalying non-english categories in it. An example - I'm now in the category with the only english characters in the category names - Catalog/News/Daily/Sites - sub build_linked_title works with it, and <%title_linked%> in the category.html replaced on the generated page with:
Catalog : News : Daily : Sites
Then I'm trying to rename "News" or "Daily" with non-english characters in the category names, sub build_linked_title_mb works with it and in the result I recieve only:
Catalog : News : : Sites or
Catalog : : Daily : Sites
The same problem are on other servers of my friends, that are using Links 2.0 with non-english mod. I'm using russian language letters, win-1251 code table. What shall we do or where are wrong? Please...

Quote Reply
Re: nonenglish mod -the problem In reply to
In the nph-build.cgi you have:


sub build_linked_title_mb {
# --------------------------------------------------------
# Returns a string of the current category broken up
# by section, with each part linked to the respective section.

my ($input) = $_[0];
my ($description) = $_[1];
my (@dirs, $dir, $output, $path, $last, @descs, $desc);

@dirs = split (/\//, $input);
@descs = split (/\\/, $description);
$last = pop (@dirs);
$last = pop (@descs);

$output = qq| <A HREF="$build_root_url/">Hem</A> :|;
foreach $dir (@dirs) {
$path .= "/$dir";
$desc = shift (@descs);
$output .= qq| <A HREF="$build_root_url$path/">$desc</A> :|;
$output .= " $last";

return $output;


I changed the $desc in [HREF="$build_root_url$path/">$desc</A> :|;] to Nisse [HREF="$build_root_url$path/">Nisse</A> :|;], and Nisse showed up fine. The problem is with $desc. But how to fix it...?