On the Way to Better Multilingual Support

Greetings from the Development Seed Headquarters in Washington, DC, which is a very nice place to stay and even to get some work done ;-)

DrupalCon recently finished up over in Sunnyvale, CA, and all the great ideas that were brought up, discussed, and just floating in that air during the conference are finding their way into Drupal patches and code. The best news I have to report is that the new language subsystem code has finally hit Drupal core!

This is great news for everyone who’s interested in multilingual Drupal websites. The new language subsystem will better support multiple languages running on the same website and improve the experience for the site user and the administrator. Gabor Hojtsy, Károly Négyesi (chx), and myself did most of the work on this code at the Internationalization Huddle that Development Seed sponsored over in Budapest last month. I wrote about those meetings here and here, and Gabor talks about the process of getting the code committed to core over on Drupal.org, http://drupal.org/node/131516. Thanks to everybody who helped and commented, we are really making progress!

These features are in the patch accepted into Drupal Core:

  • Powerful language management with many options like LTR/RTL settings, configurable language prefixes, url aliases, native names, and weights. This will give website administrators many ways of configuring their sites in different languages. For example, the site can be displayed differently in a left-to-right language than it would be in a right-to-left language. Also urls can be set for the language the page is in – mysite.org/english or mysite.org/espanol, or mysite.en and mysite.es, for example.
  • Full language negotiation based on user agent/path/url/user settings and support for language dependant URL aliases. This means that content will be automatically displayed with the unique user in mind. For example, if a user has her browser set to French, the content will automatically appear in French.
  • The language subsystem hooks into the right places of Drupal core. Overall, the system is well integrated so that if you don’t need multilingual capabilities, it won’t slow you down.

Our next steps are to

  • Implement a web interface for language dependent variables.
  • Determine a mechanism for translating web configurable strings, which we discussed at the Drupal conference and previously outlined in http://groups.drupal.org/node/1880.
  • Add language fields for objects like nodes and blocks.

Once added, all of these features should make it easier for site administrators to configure multilingual websites. For example, they will allow content publishers to use a backend in their own language and allow an administrator to determine which parts of the site appear in which languages.

I think that adding the language subsystem to Drupal core will really smooth the path for further progress in Drupal’s multilingual support. Now that we've got the basics working, we can move forward with small, incremental patches that will further improve the system. This was not very easy before, as it was really difficult for small language related patches to make sense on their own without having an underlying language management system in place.

I'll try to have a copy of i18n module in sync with Drupal-head so it can be a good proof of concept of how we can build some more features on top of what we have into core at any moment.

Thanks again to everyone who’s helped with this!

1 Comment
This is very exciting, I'm

This is very exciting, I'm looking forward to this. Thanks for sharing some of the details plus screengrabs!