Project

General

Profile

Actions

Bug #118

closed

Website link to DDL Debian repository is dead for all languages but French

Added by Jean-Michel Philippe over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
Programming
Start date:
05/16/2011
Due date:
05/31/2011
% Done:

100%

Estimated time:
3:00 h
Spent time:

Description

The Debian repository link refers to a missing Html page: index.ru.html. Russian is certainly not the only one. It would be better to use a Php script with a variable for the language:

index.php?lang=ru

The only real good solution is to write a redirection script similarly to the download.doudoulinux.org link. We would then need to write a Debian repository page in Spip.

As a workaround we can temporarily write a small Php script that tests existence of the Html page before redirecting, with fall-back to English as usual…


Files

index.new.withcomment.php (1.51 KB) index.new.withcomment.php Xavier Brusselaers, 05/16/2011 02:02 PM
Actions #1

Updated by Jean-Michel Philippe over 13 years ago

  • Assignee deleted (Jean-Michel Philippe)
Actions #2

Updated by Xavier Brusselaers over 13 years ago

    if (!isset($Langue)) {    $Langue = explode(",",strtolower($_SERVER["HTTP_ACCEPT_LANGUAGE"]));
                            $Langue = substr($Langue[0],0,2);}
    else {$Langue = "en";}
    $TargetFile = "index.".$Langue.".html";
    if (file_exists($TargetFile)) { header("Location: ".$TargetFile); }
    else { header("Location: index.en.html"); }

OR

    if (!isset($Langue)) {    $Langue = explode(",",strtolower($_SERVER["HTTP_ACCEPT_LANGUAGE"]));
                            $Langue = substr($Langue[0],0,2);}
    else {$Langue = "en";}
    $TargetFile = "index.php?lang=".$Langue;
    if (file_exists($TargetFile)) { header("Location: ".$TargetFile); }
    else { header("Location: index.php?lang=en"); }

View files for comment.

Actions #3

Updated by Xavier Brusselaers over 13 years ago

  • Assignee deleted (Xavier Brusselaers)
Actions #4

Updated by Jean-Michel Philippe over 13 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

I figured out that the Spip skeleton was not correct: leading to Html pages directly instead of Php. Now everything is working :). We now need a new ticket to port the download page principle to this page.

Actions

Also available in: Atom PDF