Hi.
I have a problem. I install silverstripe 2.4 and modules Multilingual Module. But when I start the module I have that the message :
Fatal error: Class 'Requirements' not found in /public_html/ss/multilingual/_config.php on line 10
this file :
_config.php
1 <?php
2
3 // Config is set in z_site/_config.php for the site using multilingual module
4
5 /******************************************************************************************************
6 * Multilingual module with i18n support
7 *
8 /******************************************************************************************************/
9
10 Requirements::css("multilingual/css/langselector.css");
11
12 i18n::set_default_locale("sv_SE");
13 Multilingual::set_default_lang("sv");
14
15 Multilingual::set_langs(array(
16 "Swedish"=>array(
17 "sv"=>"sv_SE"
18 ),
19 "English"=>array(
20 "en"=>"en_GB"
21 ),
22 "German"=>array(
23 "de"=>"de_DE"
24 )
25 ));
and file multilingual/css/langselector.css
#lang {
position: relative;
z-index: 999;
}
#lang ul{
float:right;
margin:5px 0px 10px 0;
list-style-type: none;
}
#lang li{
font-size:10px;
float:right;
margin:0 10px 0 0;
}
#lang li a{
font-size:12px;
}
#lang li a,
#lang li a span{
line-height: 1.4em;
float:left;
opacity:0.6;
color:#111;
}
#lang li a.selected,
#lang li a:hover{
opacity:1;
text-decoration: underline;
}
#lang li img{
float:left;
margin:0 2px 0 0;
}
and on the main page
Parse error: syntax error, unexpected T_STATIC in /public_html/ss/multilingual/code/Multilingual.php on line 12
<?php
class Multilingual extends DataObjectDecorator {
/* * ********************************************************************************
********************
/* lang statics, getter, setters
/********************************************************************************
********************* */
static $use_URLSegment = false;
static $decorated_class; // used in the child classes to get what we are decorating
function get_decorated_class() {
return static::$decorated_class;
}
private static $lang;
private static $default_lang = "sv";
/*
* All the languages available for the site, as an associative array
*/
static $langs = array(
"Swedish" => array("sv" => "sv_SE"),
"English" => array("en" => "en_US"),
);
static function set_langs($array) {
static::$langs = $array;
}
where is the problem ??