We've issued a new stable release of SilverStripe today! It restores support for multiple-language websites and includes a small set of usability and performance improvements.
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
- Translated pages can be nested in the CMS tree.
- You can bookmark a URL that will load the CMS with a specific page in a specific language.
- 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
- 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".
- 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).
- Extensive unit testing coverage added.
- When you have a single-language site, there used to be some multiple-language support loaded anyway. This has been fixed, meaning single-language websites will load faster and use less memory.
- 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.
Other new CMS features
There are many other small improvements and fixes in this release. One example is the ability to delete a page from both the draft and published sites and be able to restore it again later. Very useful! Check out our 2.3.2 changelog for details.