5412 Posts in 1649 Topics by 1188 members
|Go to End|
25 May 2011 at 6:42am
In SilverStripe 2.4, calling i18n::set_default_locale with anything other that en_US causes empty message boxes in the CMS.
To recreate this behaviour (or behavior if you're en_US!), add to _config.php ...
...then log into the CMS (or refresh if already logged in). Edit a page and navigate away without saving. Instead of 'Are you sure you want to navigate away from this page', you get an empty message box.
The reason I want to call i18n::set_default_locale('en_GB') is so new users are automatically assigned the right interface language when they are created via the grid (which only has First Name, Last Name, Email, and Password fields) rather than by clicking 'Add Member'. What's the correct way to set the default language that doesn't have undesirable side effects?
Note: this is about setting the language in the CMS e.g. so people using the CMS see a 'Behaviour' tab not a 'Behavior' tab. This is not about making the resulting site translatable.
26 May 2011 at 9:49am Last edited: 26 May 2011 9:52am
Solved, kind of...
Messages for CMS popups are available for the following locales (as of SS 2.4):
Either the logged in user's locale (i.e. the interface language selected in their profile) or the default locale must be one of those languages, otherwise popups are empty.
e.g. Copy en_US.js to en_GB.js and change the line...
For languages where there is not a close equivalent, it would not take long to translate as there are only 35 short messages.
Bear in mind when doing this, care needs to be taken when upgrading SilverStripe.
Are 3rd party translations of these files available and stored somewhere else?
Why is the CMS avaliable in 40 languages (see cms/lang) but the popups are only in 5 languages?
28 May 2011 at 10:42pm Last edited: 28 May 2011 10:47pm
Just to add to that: seems there are quite some translations missing from the files in that directory. For anyone interested, I do have an extended dutch version, that covers most (I hope). I could convert it to an en_US, so others could take it from there...
|Go to Top|