Hi,
I get the following PHP notice after upgrading to 1.0.1 from 0.9.7:
Notice: Undefined index: fr in /www/statusnet/lib/language.php on line 303
I checked the line and it appears that the problems lies here:
$all_languages = common_config('site', 'languages');
I added the following lines into my config file:
$config['site']['languages'] = array(
'en' => array('q' => 1, 'lang' => 'en', 'name' => 'English', 'direction' => 'ltr'),
'fr' => array('q' => 1, 'lang' => 'fr', 'name' => 'French', 'direction' => 'ltr'),
);
and this made the trick.
That said, I think it's a bug: if no [site][languages] parameter is set, this notice shouldn't appear. There's something missing here.
Cheers!
Comments
The following additions to config.php worked for me :
$config['site']['languages'] = array(
'en-us' => array('q' => 1, 'lang' => 'en', 'name' => 'English (US)', 'direction' => 'ltr'),
'en-gb' => array('q' => 1, 'lang' => 'en_GB', 'name' => 'English (British)', 'direction' => 'ltr'),
'en_GB' => array('q' => 1, 'lang' => 'en_GB', 'name' => 'English (British)', 'direction' => 'ltr'),
'en' => array('q' => 1, 'lang' => 'en', 'name' => 'English (US)
When I didnt have the :
'en_GB' => array('q' => 1, 'lang' => 'en_GB', 'name' => 'English (British)', 'direction' => 'ltr'),
line it still threw an error