Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Upgrading SilverStripe

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Upgrade to 2.3: Changing the backend language fails


Reply

7 Posts   1650 Views

Avatar
Stephan

27 February 2009 at 10:33pm Community Member, 55 Posts

Hi experts,
when I change the backend language to german I get the following error:

[Notice] Undefined index: en_US
GET /sapphire/main.php?url=admin/&

Line 16 in C:\inetpub\kunden\gross\wwwroot\cms\lang\de_DE.php

I'm running on a windows machine with IIS6.0
With en_US everything is ok.

TIA
Stephan

Avatar
Stephan

2 March 2009 at 10:41am Community Member, 55 Posts

Hello,
nobody has any idea why I get this error ?
This is strange. Why should en_US not be available ?
This langugage is working.
And de_DE is loaded correctly.

TIA
Stephan

Avatar
Ingo

2 March 2009 at 11:44am Forum Moderator, 801 Posts

Hm, never seen this problem with 2.3 and a norman LAMP stack (switching to german in backend).
Can you check that the file cms/lang/en_US.php exists? We don't officially support IIS6, do you have access to an IIS7 instance to replicate this issue?

Avatar
Stephan

2 March 2009 at 10:07pm Community Member, 55 Posts

Hello Ingo,
yes the file en_US.php does exist, otherwise I couldn't work with the english backend.

And the file de_DE.php does exist also, bacause the error occurs in this file :

8
9 i18n::include_locale_file('cms', 'en_US');
10
11 global $lang;
12
13 if(array_key_exists('de_DE', $lang) && is_array($lang['de_DE'])) {
14    $lang['de_DE'] = array_merge($lang['en_US'], $lang['de_DE']);
15 } else {
16    $lang['de_DE'] = $lang['en_US'];
17 }

Line 16 causes the error.
But I think the problem already exists in line 13 because obviously the array 'de_DE' doesn't exist at this time.
But where is this array loaded ?

I don't think this is an IIS6 issue because everything else is working just fine.

Avatar
Ingo

3 March 2009 at 8:32am Forum Moderator, 801 Posts

Do you have any additional modules installed, or defined your own lang files in /mysite folder? Did you try ?flush=1?
Sorry for the obvious questions, but I'm running out of ideas, and can't replicate as we don't have an IIS6 instance set up with SS here...

Avatar
Stephan

3 March 2009 at 1:02pm (Last edited: 3 March 2009 1:05pm), Community Member, 55 Posts

mmhh, I have installed the ecommerce and the picture gallery module.
And there is no lang file in the mysite folder.

But I'm wondering.
Why does SS say, it doesn't know the array $lang(en_US) if the english language is displayed correct ?
Can you tell me in which part of the source the language file is loaded, perhaps I can find out what is going on.

I remember that with 2.2.3 I couldn't change the language to german as well.
But it didn't cause an error, the english language was shown.
One reason for changing to 2.3 was my hope that this will work then :-(

The first line of the source says i8n::....something and somewhere else it is said the internationalisation doesn't work with 2.3
But I've learned somewhere else that the backend language is working anyway.

Perhaps you can give me some areas where I should look and perhaps make a var_dump or so.
It would be a pitty if it doesn't work on IIS6 only because of this single problem.

TIA
Stephan

Avatar
Stephan

10 March 2009 at 11:23pm Community Member, 55 Posts

Hello,
can please someone give me a hint where to look ?

The site is working very good, also ImageGallery, SWFUploader, DataObjectManager etc. are working well.

But I still have this problem with the language for the backend.

TIA Stephan