Changeset 259 in t29-www for lib/technikum29.php


Ignore:
Timestamp:
May 28, 2012, 6:07:42 PM (12 years ago)
Author:
sven
Message:

Navigationsdateien vereinheitlicht in eine navigation.xml. menu.php kann jetzt mehrsprachige Titel extrahieren und gibt selber kein HTML mehr aus. Template/JS massiv für Mehrsprachlichkeit umgebaut.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/technikum29.php

    r255 r259  
    2121);
    2222
    23 $lang = "de"; # must be index in $languages
     23// try to determine the language from the file path
     24$lang = substr($file, 1, 2);
     25if(!in_array($lang, array_keys($languages))) $lang = "de"; # check if language exists
    2426$lang_path = $languages[$lang][1]; # shorthand, relative to webroot. use "$webroot$lang_path" for local.
    2527
     
    3537        "$lib/menu.php",
    3638        "$lib/messages.php",
    37         "$lib/../de-v6/hauptnavigation.xml",
    38         "$lib/../de-v6/sidebar.xml",
    39         "$lib/../de-v6/news.php",
     39        "$lib$lang_path/navigation.xml",
     40        "$lib$lang_path/news.php",
    4041);
    4142
Note: See TracChangeset for help on using the changeset viewer.
© 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