[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian WWW CVS: gecko



On Fri, Oct 29, 1999 at 08:08:59AM -0700, Darren O. Benham wrote:
> On Fri, Oct 29, 1999 at 09:22:14AM +0200, peter karlsson wrote:
> > 
> > I looked now on how it was implemented, and I think it could have been done
> > a little bit cleaner. The language names are used in other places than just
> > the translation links, and in those places, I believe that it is better to
> > have the local translation of the name.
> > 
> grrrr... how dare they ;)
> 
> That is a problem.  I'll move the small list into the languages.wml file
> and restore the original language_names.wml file.. will that suffice? 
> 
If %trans is used in other locations, why not leave it alone and simply
modify the function languages() to use:

  if (@used_langs) {
     $str = "<HR>\n<langtext>:<BR>\n";
     foreach (sort @used_langs) {
        if ($_ eq "chinese") {
           $str .= "<A href=\"$file.$langs{$_}-cn.html\">$trans{$langs{$_}}{$_}&nbsp;(GB)</A>&nbsp;\n";
           $str .= "<A href=\"$file.$langs{$_}-tw.html\">$trans{$langs{$_}}{$_}&nbsp;(Big5)</A>&nbsp;\n";
        } else {
           $str .= "<A href=\"$file.$langs{$_}.html\">$trans{$langs{$_}}{$_}</A>&nbsp;\n";
        }
     }
     $str .= "\n<BR><A href=\"$base_url/intro/cn\"><setlang></A>\n";
  }

There is no point in keeping two lists of translations.

The only problem with this, besides any charset problems, is that the languages
always appear in the same order (based on the English spellings).

-- 
James (Jay) Treacy
treacy@debian.org


Reply to: