A first look at Drupal 8 translation

Read the original article on x-team.com.


Disclaimer: Drupal 8 is still in a very early stage. Therefore, some examples or content in this article is subject to change without notice.

Translating content in Drupal isn’t a straightforward task in Drupal 7. That is why they made it a priority in Drupal 8 to make this process smoother. They even created a whole initiative that you can follow here.

Let’s take a look at what is needed to get up and running with a multilingual website in Drupal 8.

Installation

I will be using the Drupal 8.0-alpha9 package that you can find here

The first thing you need to do in order to make your website language-aware is to activate the required module in the extend section of the administration.

 

modules-640x235

Once they are all activated, you can add a new language by going to “admin/config/regional/language” and choose the priority of the language you just added.

Once this is done, you can now choose the part of the website you need translation for by going to “admin/config/regional/content-language.” In my example, I chose to translate the content and all the associated fields except the file field.

configurations-640x393

Translation

I will go ahead and create a new article in English and start the translation process right away to French.

article_edit-640x316

 

Once the article is saved and published, we can translate it right away into the site’s other language.

live_article-640x441

 

When your article is finally translated, you will be able to toggle between both languages with the language translation block.

Final thought

When I first tried Drupal 8 translation modules a year ago, we couldn’t translate the node title, the URL and the site configuration (like the site title). Right now, everything works well. This is a huge step forward when we know what the core devs have been through implementing properties translation.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.