In the previous tidbits we covered each language and translation capability one by one. The community translates the software interface on http://localize.drupal.org/ which you can customize with Interface translation. You can translate your local configuration and content with the Configuration translation and Content translation modules respectively. However, actual real life use cases are never clear cut like that. Content shows up with some shipped interface elements, local configuration and content. Menus contain elements from code, content and configuration. It is good to know how these pieces relate so you can translate every piece and know the right place to do it.
Now that we covered how content translation workflow works in Drupal 8, its time to look a bit at the API side. In Drupal 7 this meant dealing with scary seemingly infinitely nested arrays with language codes, field names, deltas, etc. Drupal 8 makes this a whole lot simpler.
In the previous tidbit, we covered content translation basics. In short now you can configure translatability on any subtype of any entity type, so for example articles or specific taxonomy vocabularies may be configured to have all their entities support translation. Then each entity structure may be configured on the field and in some cases subfield level to support translation. The question is how does it all work then, what do we do to translate content?
I had the chance two weeks ago to talk about Drupal and Drupal 8 at the Free Software Foundation's conference in Budapest for a whole of 21 minutes. While there is this amazing 63 screen slideshow about all things new in Drupal 8 that I help keep up to date, having such short time really made me focus my message and think long and hard about how to summarize what Drupal 8 is really about for a wide range of people attending. Here is my take in written form.
Drupal has always been amazing as a structured content management tool. With content types and then entities and fields it allows us to really structure our content. Drupal 8 steps up this game several ways. First, it makes more things able to get structured. Whether it is a block or the categorization of content itself, it can be structured further with fields now. Drupal also has a history of using this structural system for flexible functionality. For example, ratings, workflows, user groups, selling content, etc. are all supported with fields (in contributed modules). In Drupal 8, comments are fields too (for example, you can take comments on user profiles) and there are more reusable field types like date, email, references, etc. built in. Best of all everything supports multiple languages and is translatable without further modules required. In short, Drupal 8 is improving on the system's key strength in all directions.
This is amazing for an enterprise because content needs to show up in a lot of places and a lot of ways these days. The more structured the content, the easier it is to pull out and display things for the environment needed. Drupal 8 makes this easy by building in entity view modes for display variants, Views for pulling data in whatever way from entities, and responsive output for flexible display on the web. Integration with third party systems and decoupled site implementations is enabled by web service support. Since Drupal knows so much more about your content structure internally as well, it can also intelligently cache (and invalidate the caches) when needed, and serve pages with much faster perceived performance (enabling the BigPipe contributed module). The markup generated is significantly better for accessibility too.
What about the small sites though? I think the changes are even more exciting there, because they lead to a lot more consistency on the site building front as well. You now use blocks to place everything on your pages (including branding, navigation and even the page title). You can use Views to customize even your administration experience and quick in-place editing and WYSIWYG integration for fields allows you to get further, faster. On top of that, rolling out changes is a whole lot easier with the built-in configuration deployment system.
Drupal 8 also grew the core community manyfold. While Drupal 7 had less than a thousand contributors, Drupal 8 has almost 3300. That is pretty remarkable, because it means the new version starts out with many more people already in the know.
All-in-all Drupal 8 really doubles down on our commitment to structured content and flexible functionality around it with a focus on making it easier to both enter and output that content however it fits, whoever the consumer is. It truly empowers you and me (as the tagline says) to build something amazing, for anyone.
If you are interested in to learn about, solve your problems with and/or contribute to multilingual Drupal, DrupalCon Barcelona is the place to be. Here is a quick summary of things happening so you don't miss what is going on.
Drupal 8 comes with a whole new set of multilingual features, which combined with other improvements is even more powerful. Drupal 8 multilingual site building hacks is the place to be to see that in action.
Drupal 8 packs a historic amount of site building features which make producing websites easier than ever with core or just a couple contributed modules only. There are already various live Drupal 8 multilingual sites using little more but core.
It is hard to grasp the many things with useful levers and knobs in Drupal 8. Think about combining views with entity view modes and blocks; block language visibility with menus; user preferences with comment submission; language filtering and entity rendering; translatable fields with administration views; and so on and on.
Wouldn't it be fun to experiment with the possibilities and come up with clever ways to combine core features to solve common problems? You may be familiar with the name and format of O'Reilly's Hacks Series which reclaims the term "hacking" for the good guysfolks — innovators who explore and experiment, unearth shortcuts, create useful tools, and come up with fun things to try on their own. The excellent series inspired the name and format of our contest.
Long story short, hereby, we announce the Drupal 8 multilingual site building hacks contest!
Rules
Come up with clever ways to combine Drupal 8 core features (and if needed one or at most two contributed modules) to fulfill a multilingual site building need.
Write up the steps taken. See an example in hack #1. (We'll do light editing of the post if needed, don't let perfection be the enemy of good).
One person may submit as many entries as they wish.
All entries will be published after review (and possible light editing).
What is in it for you?
The top 3 best hacks will receive unique presents from Hook42 and Amazee Labs! (Further sponsors welcome). You'll either receive the presents at DrupalCon Barcelona or we'll mail it to you if you are not coming to DrupalCon. This is of course additionally to the joy of getting to play with some of the less frequented but definitely no less fun features of Drupal 8.
What is in it for us?
All hacks will be published under Creative Commons Attribution-ShareAlike 4.0, so the community will benefit. Additionally to that Gábor Hojtsy and Vijayachandran Mani are building an open source presentation with the best tips (same license). This will be presented at Drupalaton Hungary and DrupalCon Barcelona. Similar to our existing open source workshop, everyone will be able to present this at local meetups and camps or follow along at home at their own pace.
What kind of hacks are we looking for?
Hack #1 is hopefully a good example. Really the only common thread between the hacks would be to satisfy a multilingual site need or use multilingual features in some other clever way (even for features that are not necessarily multilingual). Some ideas for hacks that may help you start off experimenting:
Swap textual site logo Need to swap a site logo with text on it for different languages? Use a translatable custom block with an image field. Configure the display mode and add some custom CSS if needed.
Translator todo helper Create a views block for content translators to summarize the number of outdated translations they have to update (and link to content administration filtered to that language)
Language dependent front page Use block visibility to display up to date content on a well maintained language while an About us / Contact us page on languages where resources are limited to maintain useful fresh content.
Of course these are just some things we made up (although still eligible for the contest). Looking for your creative ideas and solutions!
The Drupal 8 multilingual team is really great in spreading know-how on the new things in the upcoming version, so we had our session (1h) and workshop (2h) recordings published and widely available. While we of course love our baby and can talk all day about it, who has hours when they just want to explore what is coming up? We just addressed that this week with the following.
1. New 2m22s introduction video with the key benefits
2. A quick summary of key benefits and an easy to skim features list
Thanks to our work on the multilingual workshops for DrupalCons, BADCamp and DrupalCamps, we have a demo with sample content in 4 languages that you can try out in your browser for 30 minutes without any registration or local software install required thanks to simplytest.me.
4. Check out who voted with their feet already
Drupal 8 is not yet released, yet there are numerous live multilingual Drupal 8 sites helping with nature preservation, finding health professionals or concert tickets among other good uses. Now there is a handy list to review at http://www.drupal8multilingual.org/showcase.
I finally stopped putting it off and took the opportunity to test myself on the Acquia Certified Developer exam. To be honest I put it off for quite long. As a household name in the community I had fears it will prove I am not good enough and funnily enough, I did worst on back end development (ooops!) and 10% better on site building. My overall result is actually the same as Angie Byron at 85%. I'm flawless with fundamental web concepts at least. Ha!
As a computer science major who transferred into more of a mix of development, leadership, events and content production, I don't have much of an experience with tech certification exams. My only encounter was with the CIW certifications 13 or so years ago, which I took back in the day to be able to teach the CIW courses at a local private school. Judging from that experience and common wisdom, I expected paperbook style questions where I need to know the order and name of arguments and options on l() as well recite row styles of views and available options of date fields. The reality cannot be farther from that.
In the introduction to content and configuration translation piece we discussed what is considered content in Drupal 8. This is a somewhat misleading term because custom blocks, custom menu items and even user entities (user profiles) are considered content in terms of their implementation.
Content is always stored as entities. The main difference between configuration and content entities is configuration is usually created on the backend (think views, vocabularies, etc.) while content is usually created on the frontend (think free tagging taxonomy terms, comments, blog posts). This is not a black and white differentiation but it helps think of the categories. The other key differentiator is content entities usually get to have configurable fields. You can add new fields to user profiles, taxonomy terms or comments. Again there are exceptions, for example custom menu items cannot get configurable fields in core. Finally, there are even content entities that will not be stored, in Drupal 8 contact form submissions are content entities that live only until they are sent via email. For this tidbit we are concerned for content entities that are stored and multilingual.
A fun fact about people on the multilingual team is that even though we usually turn out in big numbers at sprints, there are numerous great mentors among us, so we don't work on code that much at mentored sprints. We do a great job helping people get started and move into more serious core work though. Our most famous mentee this past year is 2014th Drupal 8 core contributor Holly Ross, Executive Director of the Drupal Association who contributed her first and second core patches fixing multilingual issues.