Beispiel #1
0
 /**
  * Localisations etc.
  * @author	Mark Grimshaw
  * @version	1
  */
 function loadArrays()
 {
     // WIKINDX-specific.  Months depend on the localisation set in the bibliographic style file.  'et al.' depends on the user's wikindx localisation.
     if ($this->wikindx) {
         $styleLoc = FALSE;
         /* // temp......
             // Style localisation
             $languageDir = $this->style['localisation'];
             if(!is_dir("languages/$languageDir"))
             $languageDir = "en";
             include_once("languages/$languageDir/CONSTANTS.php");
             $class = "CONSTANTS_" . $languageDir;
             $this->wikindxLanguageClass = new $class();
             if(method_exists($this->wikindxLanguageClass, "monthToLongName")
             && method_exists($this->wikindxLanguageClass, "monthToShortName"))
             {
             $this->longMonth = $this->wikindxLanguageClass->monthToLongName();
             $this->shortMonth = $this->wikindxLanguageClass->monthToShortName();
             $styleLoc = TRUE; // successfully localised
             }
            */
         // temp.......
         $styleLoc = TRUE;
         // User localisation
         include_once "core/session/SESSION.php";
         $session = new SESSION();
         if (!($languageDir = $session->getVar("setup_language"))) {
             $languageDir = "en";
         }
         include_once "languages/{$languageDir}/CONSTANTS.php";
         $class = "CONSTANTS_" . $languageDir;
         $this->wikindxLanguageClass = new $class();
         if ($styleLoc && isset($this->wikindxLanguageClass->textEtAl)) {
             $this->textEtAl = $this->wikindxLanguageClass->textEtAl;
             $this->possessive1 = $this->wikindxLanguageClass->possessive1;
             $this->possessive2 = $this->wikindxLanguageClass->possessive2;
             return;
         }
     }
     // Defaults.  Any localisation in external files as above should follow this format.
     $this->longMonth = array(1 => 'January', 2 => 'February', 3 => 'March', 4 => 'April', 5 => 'May', 6 => 'June', 7 => 'July', 8 => 'August', 9 => 'September', 10 => 'October', 11 => 'November', 12 => 'December');
     $this->shortMonth = array(1 => 'Jan', 2 => 'Feb', 3 => 'Mar', 4 => 'Apr', 5 => 'May', 6 => 'Jun', 7 => 'Jul', 8 => 'Aug', 9 => 'Sep', 10 => 'Oct', 11 => 'Nov', 12 => 'Dec');
     // Scan for occurrences of creator name(s) followed by 'et al.' when checking if surname(s) is in same sentence as citation.
     // e.g. Grimshaw et al. state "blah blah blah" [cite]123:45-46[/cite].
     $this->textEtAl = 'et al.';
     // Similarly, check for possessive form of a single creator name in the same sentence.  English has two forms (the second below for names that end in 's').
     // If there is no equivalent possessive form in another language, set these to FALSE.
     $this->possessive1 = "'s";
     $this->possessive2 = "'";
 }