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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Small Display Bug after Update to SS 3.1.2

Go to End

10 Posts   2265 Views


Community Member, 8 Posts

4 December 2013 at 9:03am

Hi Dacar,

in my opinion there are three things related to the issue:

1.) The old behavior to fall back to the default language was broken by changing the language names from long names to short names e.g. de_DE to de, en_US to en and so on. The menu items for "right click on tree items" were always in english as the string was not in the translation file and the fallback to the en_US worked fine. I supplied a small fix to establish another fallback level which will look for the default language with the short name.

2.) The translation files are incomplete, you already completed the german translation file. Can you create a pull request for these changes at github so it can be included in the next version? But I am not sure if changes should be made directly to the files in cms/javascript/lang, as they have a note in their header about an automated creation process. So I think the changes has to be made to the files in the src subdirectory. (In the meantime I will use your version of the de.js file) :-)

3.) There seems to be a lot i18n function calls without a default/fall-back string, which is the last level of fall back when looking for a translation. These function calls should always include a default string (english is better than an empty field...).

I am not sure if I can find the time to search for all calls of the i18n function and add a default string to all of them if they do not already have one.

Kind regards,


Community Member, 8 Posts

4 December 2013 at 9:27am

Hi Dacar,

one more thing I just noted when I copied your translation to my system.

In your code the language name for the addDictionary function call is "de_DE", but version 3.1.2 (or my 3.1.x-dev) use the short name for the language.

Which version of Silverstripe are you using? It seems that it will work also with the de_DE, but I can not say what implications there might be...

// This file was generated by GenerateJavaScriptI18nTask from javascript/lang/src/de.js.
// See for details
if(typeof(ss) == "undefined" || typeof(ss.i18n) == "undefined") {
	if(typeof(console) != "undefined") console.error("Class ss.i18n not defined");
} else {
	ss.i18n.addDictionary("de", {

Kind regards,

Go to Top