source: t29-www/en/no-translation.php @ 714

Last change on this file since 714 was 390, checked in by sven, 11 years ago
  • Vor/Zurück-Link bei Lernprojekten aktiviert
  • Anzeige fehlender englischer Übersetzungen wieder aktiviert (aufgehübscht; mit Infobox)
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1<?php
2        $seiten_id = 'no-translation'; // befindet sich nicht in navi
3        $lang = 'en'; // force language
4        $version = '$Id: no-translation.php 390 2013-05-09 12:37:12Z heribert $';
5        $titel = 'No English translation available';
6        $dynamischer_inhalt = true;
7       
8        // see usage below
9        $how = isset($_GET['how']) ? $_GET['how'] : 'no';
10        $backurl = isset($_GET['backurl']) ? $_GET['backurl'] : null;
11        $backtitle = isset($_GET['backtitle']) ? $_GET['backtitle'] : null;
12       
13        $template_callback = function($template) use($backurl,$backtitle) {
14                if($backurl) {
15                        $template->set_page_relation("prev", $backurl, $backtitle ? $backtitle : "German version of page");
16                        $template->current_link_classes = array('show-rel-prev');
17                }
18               
19                $template->interlang_links = array(
20                        'de' =>  $backurl ? t29Menu::dom_new_link($backurl, $backtitle) : t29Menu::dom_new_link('#', 'unknown'),
21                        'en' =>  t29Menu::dom_new_link('#', 'This "no translation available" page'),
22                );
23        };
24
25        require "../lib/technikum29.php";
26?>
27    <!--
28       "Not yet translated"-Page Usage
29       Get-Param    optional  values
30       how          yes       (yet|no)   => yet = Not yet translated | no = no translation
31       backurl      yes       == url_de
32       backtitle    required  title of german page
33
34       GET-Parameters can be seperated by using , (commas) or normal sperators (&), for example:
35         ?how=yet&backurl=index.shtm&backtitle=Main%20Page
36         ?how=no,backtitle=Blabla
37    -->
38
39    <? /*
40    <!--#if expr="$QUERY_STRING = /how=([^,&]+)/" --><!--#set var="how" value="$1" --><!--#endif -->
41    <!--#if expr="$QUERY_STRING = /backurl=([^,&]+)/" --><!--#set var="url_de" value="$1" --><!--#endif -->
42    <!--#if expr="$QUERY_STRING = /backtitle=([^,&]+)/" --><!--#set var="backtitle" value="$1" --><!--#endif -->
43    */ ?>
44
45    <?php
46
47       
48        if($how == 'yet')
49                $h2 = "The page &raquo;$backtitle&laquo; has not been translated yet";
50        else
51                $h2 = "There is no translation for ".($backtitle ? " &raquo;$backtitle&laquo" : "the page you requested");
52   
53        print "<h2>$h2</h2>";
54       
55        //$url_de = "/de/"...
56        //$backurl = "/de/".$url_de;
57       
58        if($backurl)  {
59                ?><p class="panel-hide">Please <a href="<?=$backurl; ?>">go back to the german page</a>.</p>
60                <p>You can also use automatically generated translations from <a href="http://www.google.com">Google</a> or <a href="http://babelfish.altavista.com">Altavista Babelfish</a>
61                (but don't expect too much):</p>
62                <ul>
63                <li><a href="http://translate.google.com/translate?hl=en&sl=de&u=http://www.technikum29.de/<?=$backurl; ?>&prev=/search%3Fq%3Dtechnikum29%26hl%3Den%26lr%3D%26sa%3DN">Read the google translation</a></li>
64                <!--<li><a href="http://babelfish.altavista.com/babelfish/tr?doit=done&url=http://www.technikum29.de/<?=$backurl; ?>&lp=de_en">Read the Altavista bablefish translation</a>-->
65                <li><a href="http://www.microsofttranslator.com/bv.aspx?from=de&to=en&a=http://www.technikum29.de/<?=$backurl; ?>">Read the Microsoft translator (Babelfish/Bing)</a></li>
66                </ul><?php
67        } else {
68                ?>
69                <p>There is no english translation for the requested page.</p>
70                <p><a class="go" href="javascript:history.go();">Back to the german page</a></p>
71                <?php
72        }
Note: See TracBrowser for help on using the repository browser.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License