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.

 

Making SilverStripe fluent in other languages

SilverStripe is on it's way to becoming a polygot, mastering all the languages. Senior developer Robbie Averill talks us through how SilverStripe is approaching multi language and localisation support with our fluent module. 

Read post

As the web technologies of today progress increasingly quickly, so too does the need for personalisation tools and new ways of opening up website content to users from different parts of the world.

The SilverStripe CMS has historically had a strong presence in Europe, following the release of our Lead Solution Architect Ingo Schommer and Steven Broschart's book entitled "SilverStripe: The Complete Guide to CMS Development". Originally written in German, the book allowed our free, open source software to be discovered and enjoyed by a wider community of developers and users of where English was not their primary language.

As a result, several community developers and agencies around the world began developing modules for SilverStripe that would allow enable multilingual and localisable content.

translatable4 smalllllerr

A CMS view of the translatable module

Version 1 of our Common Web Platform ships by default with our Translatable module which allows CMS editors to create new content hierarchies for different languages. This allows content editors to tailor and personalise a website's content to people from different regions of the world, without requiring a separate website.

At around the same time one of our Principal Developers Damian Mooyman identified a slightly different use case for translating content, in that some websites may need some of their content localised rather than purely translated. In doing so Damian created the Fluent module, which allows content editors to use the same content hierarchy, but translate or localise content where required, and allows content from the default locale to inherit through in cases where content has not been adjusted.

Think "color" versus "colour" - in some cases you might want to present a whole new set of content to your American compatriots, but other times you may only want to localise small parts of your content. In the latter case, it may not make sense to duplicate your whole site structure, and this is where Fluent is a useful alternative to Translatable.

CWP 2.0 is becoming fluent

With the impending release of SilverStripe 4, we've also been working hard to bring the New Zealand Government a new version of the Common Web Platform. The newest version of this tailored CMS software package will ship with a brand new version of Fluent, built from the ground up to combine the best features of Translatable and Fluent to deliver the ultimate "translocalisation" tool for SilverStripe and Common Web Platform content authors.

Pasted image at 2017 10 31 03 21 PM

Fluent in action on SilverStripe 4

Some high level features of the new version of Fluent include having multiple domains, with a default locale (e.g. New Zealand English) and a nested tree of locale fallbacks (e.g. US English falling back to Australian English falling back to New Zealand English).

At a database level, Fluent now publishes localised content into new rows (similar to Translatable) rather than expanding the columns of the original database table, but still maintains a single ID for any localised record. This helps to avoid a common limitation of using Fluent in larger websites, where horizontally scaling reaches its limit but vertical scaling can continue as far as you'd like it to.

A prominently placed locale selector in the CMS interface lets you change the locale from anywhere, and visual indicators in the CMS forms will help to show you where content will inherit or override from the next locale in the fallback chain.

As with Translatable and the previous version of Fluent, you can still easily create pages that are only visible in specific locales, and can publish different page locale versions individually, rather than all at the same time.

A community effort

At SilverStripe we live and breathe open source software. We try to encourage and foster community contributions to our software at every possible opportunity, and we're stoked to see the community getting involved in the efforts with our multi-lingual modules so far.

To date, Fluent has 20 individual developers contributing to its source code from all around the world - as far as Finland, Germany, Honduras and Croatia, and as close (to New Zealand) as Australia.

Translatable (a couple of years older) has 38 developers contributing changes, from Chile, Estonia, Sweden, the United Kingdom and United States, and many more.

It's clear to see that SilverStripe users around the world are making good use of the language personalisation tools we've made available in the past, and we hope to see it continue with Fluent becoming a commercially supported SilverStripe module with SilverStripe 4.

To Translatable: you've been a powerful stalwart of the SilverStripe 2 and 3 ecosystems, and we thank you for your commitment.

To Fluent: you've stayed relatively out of the spotlight with SilverStripe 3, but welcome you to SilverStripe 4 - let's do this! 

About the author
Robbie Averill

As a developer, Robbie is focused on new and innovative backend web technologies, automation, integrations, unit testing and bullet-proofing web software. Shortly after joining SilverStripe in late 2016, he has single-handedly tackled the process of upgrading sites to SilverStripe 4 and become the go-to person for his team for any technical advice.

In his other life, he's a gypsy jazz guitarist, composer and session musician who used to brew beer for a living.

Post your comment

Comments

No one has commented on this page yet.

RSS feed for comments on this page | RSS feed for all comments