hiromipaw commited on 2017-11-16 18:54:17
Zeige 1 geänderte Dateien mit 47 Einfügungen und 47 Löschungen.
| ... | ... |
@@ -65,55 +65,55 @@ |
| 65 | 65 |
</div> |
| 66 | 66 |
<!-- END COL --> |
| 67 | 67 |
|
| 68 |
-# <!-- List available languages --> |
|
| 69 |
-# <div class="col wider"> |
|
| 70 |
-# <h4>Languages</h4> |
|
| 71 |
-# <: if (has_translations()) { :>
|
|
| 72 |
-# <p> |
|
| 73 |
-# This page is also available in the following languages: |
|
| 74 |
-# <: print list_translations() :>.<br /> |
|
| 75 |
-# How to set <a href="http://www.debian.org/intro/cn#howtoset">the default document language</a>. |
|
| 76 |
-# </p> |
|
| 77 |
-# <: }; :> |
|
| 78 |
-# </div> |
|
| 68 |
+ <!-- List available languages --> |
|
| 69 |
+ <div class="col wider"> |
|
| 70 |
+ <h4>Languages</h4> |
|
| 71 |
+ <: if (has_translations()) { :>
|
|
| 72 |
+ <p> |
|
| 73 |
+ This page is also available in the following languages: |
|
| 74 |
+ <: print list_translations() :>.<br /> |
|
| 75 |
+ How to set <a href="http://www.debian.org/intro/cn#howtoset">the default document language</a>. |
|
| 76 |
+ </p> |
|
| 77 |
+ <: }; :> |
|
| 78 |
+ </div> |
|
| 79 | 79 |
|
| 80 | 80 |
# LANGUAGE SWITCH CGI |
| 81 |
-# <div class="col wider"> |
|
| 82 |
-# <h4>Languages</h4> |
|
| 83 |
-# # this is a cgi trampoline to bounce us to the right page |
|
| 84 |
-# # alternately, if the client supports javascript we can redirect that way |
|
| 85 |
-# # noscript does not block onclick but clients may have disabled javascript completely |
|
| 86 |
-# # |
|
| 87 |
-# # for this to work we need to know the relative path from the document root |
|
| 88 |
-# # to the current directory that wml is in. |
|
| 89 |
-# <form action="$(DOCROOT)/cgi-bin/languageswitch.cgi"> |
|
| 90 |
-# <select name="Language" id="lang"> |
|
| 91 |
-# <:{
|
|
| 92 |
-# #import "perl-globals.wmi"; |
|
| 93 |
-# use Cwd; |
|
| 94 |
-# use Cwd 'abs_path'; |
|
| 95 |
-# use File::Spec; |
|
| 96 |
-# my $urlbase = File::Spec->abs2rel(getcwd(),abs_path("$(DOCROOT)"));
|
|
| 97 |
-# my $LANGUAGES; |
|
| 98 |
-# my $page = $WML_SRC_FILENAME; |
|
| 99 |
-# opendir(DIR, getcwd()) or die $!; |
|
| 100 |
-# # take a look and see what language support we have |
|
| 101 |
-# while (my $file = readdir(DIR)) {
|
|
| 102 |
-# if (-d $file) {
|
|
| 103 |
-# if (-e "$file/$page") {
|
|
| 104 |
-# my $url = $urlbase.'/'.$WML_SRC_BASENAME.'.html.'.$file; |
|
| 105 |
-# my $url2js = $WML_SRC_BASENAME.'.html.'.$file; |
|
| 106 |
-# print '<option value="'.$url.'" onclick="window.location=\''.$url2js.'\'">'.$LANGUAGES{$file}.'</option>'."\n" unless not defined $LANGUAGES{$file};
|
|
| 107 |
-# } |
|
| 108 |
-# } |
|
| 109 |
-# } |
|
| 110 |
-# closedir(DIR); |
|
| 111 |
-# }:> |
|
| 112 |
-# </select> |
|
| 113 |
-# <input class="go" type="submit" name="submit" value="Go"> |
|
| 114 |
-# </form> |
|
| 115 |
-# <p>Questions on this? Visit <a href="http://www.debian.org/intro/cn#howtoset">how to set the default document language</a>.</p> |
|
| 116 |
-# </div> |
|
| 81 |
+ <div class="col wider"> |
|
| 82 |
+ <h4>Languages</h4> |
|
| 83 |
+ # this is a cgi trampoline to bounce us to the right page |
|
| 84 |
+ # alternately, if the client supports javascript we can redirect that way |
|
| 85 |
+ # noscript does not block onclick but clients may have disabled javascript completely |
|
| 86 |
+ # |
|
| 87 |
+ # for this to work we need to know the relative path from the document root |
|
| 88 |
+ # to the current directory that wml is in. |
|
| 89 |
+ <form action="$(DOCROOT)/cgi-bin/languageswitch.cgi"> |
|
| 90 |
+ <select name="Language" id="lang"> |
|
| 91 |
+ <:{
|
|
| 92 |
+ #import "perl-globals.wmi"; |
|
| 93 |
+ use Cwd; |
|
| 94 |
+ use Cwd 'abs_path'; |
|
| 95 |
+ use File::Spec; |
|
| 96 |
+ my $urlbase = File::Spec->abs2rel(getcwd(),abs_path("$(DOCROOT)"));
|
|
| 97 |
+ my $LANGUAGES; |
|
| 98 |
+ my $page = $WML_SRC_FILENAME; |
|
| 99 |
+ opendir(DIR, getcwd()) or die $!; |
|
| 100 |
+ # take a look and see what language support we have |
|
| 101 |
+ while (my $file = readdir(DIR)) {
|
|
| 102 |
+ if (-d $file) {
|
|
| 103 |
+ if (-e "$file/$page") {
|
|
| 104 |
+ my $url = $urlbase.'/'.$WML_SRC_BASENAME.'.html.'.$file; |
|
| 105 |
+ my $url2js = $WML_SRC_BASENAME.'.html.'.$file; |
|
| 106 |
+ print '<option value="'.$url.'" onclick="window.location=\''.$url2js.'\'">'.$LANGUAGES{$file}.'</option>'."\n" unless not defined $LANGUAGES{$file};
|
|
| 107 |
+ } |
|
| 108 |
+ } |
|
| 109 |
+ } |
|
| 110 |
+ closedir(DIR); |
|
| 111 |
+ }:> |
|
| 112 |
+ </select> |
|
| 113 |
+ <input class="go" type="submit" name="submit" value="Go"> |
|
| 114 |
+ </form> |
|
| 115 |
+ <p>Questions on this? Visit <a href="http://www.debian.org/intro/cn#howtoset">how to set the default document language</a>.</p> |
|
| 116 |
+ </div> |
|
| 117 | 117 |
# |
| 118 | 118 |
</div> |
| 119 | 119 |
<!-- END FOOTER --> |
| 120 | 120 |