Multilingual Improvements

19 December 2014
0 Comentarios

The Multilingual Initiative (D8MI), led by Acquia's own Gábor Hojtsy with participation of over 1,000 contributors, is a major development focus for Drupal 8. 

Multilingual First

You'll see Drupal 8's multilingual roots from your very first moment: at the beginning of the installer

 

Drupal 8 auto-detects the language from your browser, and then auto-selects its option in the drop-down, for convenience.

But even better, if you proceed in a non-English language (or later add a new language to your site), it'll automatically download the latest interface translations from https://localize.drupal.org/ so you can perform your entire site installation and set up in your native language.

This is in contrast to Drupal 7, which presented users with a wall of text (in English, of course) explaining how to put download files into particular directories in order to proceed.


This works for right-to-left languages such as Arabic, too! (Note that Drupal 8 is still in development, so some translations may still be missing some strings, as is the case here.)

 

And finally, Drupal 8 also does away with the concept of English as a "special" language. If you select a language other than English here, the English option will no longer show up in your site configuration unless explicitly turned on. Also, because English is just a "normal" language, you can make English "translatable" so that you can convert e.g. "Log in / Log off" to "Sign in / Sign off."

Hooray for making Drupal more accessible to non-English speakers (aka, the vast majority of the world).


Fewer modules

Building a multilingual site in Drupal 7 requires somewhere around 30 contributed modules, and a lot of tricky configuration. In Drupal 8, all of this functionality (and more!) has all been streamlined into just four modules, together actually making Drupal 8 more multilingual-friendly than all of the Drupal 7 contributed modules combined.

  • Languaje

The base module the other multilingual modules require, it provides Drupal 8's underlying language support.

  • Configuration Translation

Makes things like blocks, menus, views, etc. translatable. (Similar to Internationalization in Drupal 7).

  • Content Translation

Makes things like nodes, taxonomy terms, and comments translatable. (Not the same as core's "Content Translation" module in Drupal 7; much more akin to Entity Translation.)

  • Interface Translation

Makes Drupal's user interface itself translatable. (Same as the "Locale" core module in Drupal 7).

Why four modules and not just one, you might ask? 

Because single-language non-English sites are also a valid use case, and even multilingual sites may or may not need some of these features (for example, a desire to always keep user-generated content in its native language). This sort of granularity allows site builders to choose whatever combination meets their sites' specific use cases.


Language selection on all the things!

Everything from system configuration settings, to site components such as blocks, views, and menus, to individual field values on content are translatable.

 

For "content" entities (comments, nodes, users, taxonomy terms, and so on) you have even more options, like the ability to configure the visibility of the language selector, and whether newly created content defaults to the site's default language, the content author's preferred language, or some other value.

 


More streamlined translation UIs

Additionally, tons of effort has been spent improving the user experience of Drupal 8's multilingual functionality. You'll see much more streamlined translation and well-integrated interfaces throughout.

 


Transliteration support

One final really handy addition to Drupal 8 is the inclusion of the Transliteration module to core. It automatically converts special characters such as "ç" and "ü" to "c" and "u" for friendlier machine names, file uploads, paths, and search results.

...And More!

Here are some extras for site builders that are worth mentioning:

- Several of the pages in core that are using Views allow for much easier language-based customization, especially the admin views, where adding language filters, a language column, etc. are easy to click together.

- Unlike the Drupal 7 Entity Translation module integration, Drupal 8 core's Content Translation module integrates well with Search in core and search API gets more language information as well.

- The language selection system now supports a separate "admin" language as well, for easier management of multilingual sites for site admins.

Source:  Acquia.com