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.


SilverStripe 2.3.2 beta 1: Multi-language support is back, and even better than before

We've issued a beta release of SilverStripe today that restores support for multiple-language websites.

Tagged release, translatable

Comments 12

by Sigurd

Posted 6 May 2009

Read post

We've issued a beta release of SilverStripe today that restores support for multiple-language websites.

We want people to test this update, and in particular, confirm that our migration script works reliably. Please help by reporting bugs so that we can confidently ready this release for production use.

Demo of translatable

SilverStripe has supported multiple-language websites since 2007. The feature which provides this is called Translatable in the codebase, and it lets you create a page with variations in different languages. Translatable is intended for websites whose content exists in a number of languages, while the structure of the site is similar or even identical for all of those languages.

Unfortunately, when we released SilverStripe v2.3.0 in March, multiple language support was broken. The release contained a number of major architectural improvements to our software in general. However, these changes meant our multiple-language feature needed to be re-architected to continue functioning. We saw an opportunity to improve how this feature worked, which required time. So, instead of just fixing Translatable, we've made it much more powerful and easy to work with:

User interface / CMS improvements

  1. Translated pages can be nested in the CMS tree.
  2. You can bookmark a URL that will load the CMS with a specific page in a specific language.
  3. The concept of a master language has been deprecated. You can now have 100 pages in English and German, then add a page that is only in German, and afterwards add a different page that is only in English. This helps reflect what is needed in the real world. Previously, you had to nominate a master language, and every page on the site had to exist in that language.

Sapphire framework improvements

  1. Added support for locales. Previously you could have a website with pages in German and English. But SilverStripe couldn't support UK English, US English, Austrian German, and German German all on the same site. Locales allow for a language to have country-specific variations, and respect that many countries have multiple languages. Technically, this means labelling each translation in the format "de_AT" rather than just "de".
  2. A new database schema reduces join operations on database tables. This improves performance. Rather than adding columns to tables to support fields in each language, it instead adds new rows and uses a column to represent the language. There is an important side effect to note, however. The old system provided the ability to make individual arbitrary fields translatable (e.g., translate "Page Title" but leave "Content" only in English.). Now you can only choose a whole object as translatable (e.g. Page Title, Content, URL, and everything else will have a field in each language.)
  3. Extensive unit testing coverage added.
  4. When you have a single-languge site, there used to be some mulitple-language support loaded anyway. This has been fixed, meaning single-language websites will load faster and use less memory.
  5. Easy language switching with unique URLs and specialised template controls.

We'd like to acknowledge Michael Gall in the community for contributing a lot of time, code, and testing to Translatable!

CMS user interface translations unaffected

Note that the ability for the CMS admin interface to appear in a different language is quite separate. This feature has continued to work properly in all releases since 2.2.0. (We are, by the way, always interested in more people contributing to translations!)

Upgrading multiple-language websites

We've automated the complex work of converting your site to the new schema. Please note that this script does not migrate previous versions of a page. Only the current draft and published state of a page is moved—see upgrade instructions. As noted above, this is a beta release. This means you shouldn't try it on a production site without thorough testing. Report bugs, or if it works well, leave a comment below.

Other new CMS features

We have a changelog of many other small improvements and fixes in this release. One example is allowing you to delete a page from both the draft and published sites, and be able to restore it again later. Very useful!