Your SlideShare is downloading. ×
0
Multilingual Drupal
    from 5 to 6
        Gábor Hojtsy
    September 19., 2007.
About me

• Working with Open Source since 1999,
  was head of PHP.net and the PHP
  documentation
• Developing with Drupa...
About you


• Experienced Drupal site builders?
• Who deals with multilingual issues?
• Knowledge in both areas?
Concepts
Your target audience
• A multilingual web site is available
  in multiple languages. It is not
  necessarily an internatio...
Two terms


Internationalization (i18n) is the
design and development of a product,
application or document content that
e...
Two terms


Localization (L10n) is the adaptation
of a product, application or document
content to meet the language, cult...
Confusions

   i18n                 L10n



multilingual       international
Drupal
Drupal “by design”
• There is the built in interface, which
  is always served from code

• You provide everything else (p...
Famous issues
๏ Default content type names
  are not translated

๏ Built-in, but modified menu
  items are neither

๏ The “...
Drupal 5
Built into Drupal 5

• Translatable installer
• Basic interface language
  list setup

• Runtime interface
  translation w...
How does it work?

• GNU gettext backend and format used
• Translation templates extracted from
  source code

• CVS used ...
Recognize the source

• t(‘Go to %page’, array(‘%page’ => $p));
• format_plural($count, ‘1 year’,
  ‘@count years’);
• Sev...
Contributed modules


• Autolocale / localized profile
• Internationalization module suite
• Localizer module suite
• XLIFF...
Computer Aided
  Translation
Outside Drupal

• Content translation works in Drupal
• But professionals use different tools
  • Translation memories
  •...
CAT workflow
Drupal implementation
Demo
Drupal 6
Drupal 6 goes forward!

• New language subsystem
• Easy interface translation import
• Performance optimizations
• Content...
Drupal 6 architecture



                            This was not
                        ready on time, so it
           ...
Languages!

• English and native language names
• Writing direction (LTR or RTL)
• Weights
• Path prefix and subdomain setu...
Right to left themes
• All CSS file additions are
  intercepted and RTL cascade files
  are searched for

• Most core themes...
Language detection


• Based on the IRI (domain, path)
• User preferences
• Browser settings
• Falls back on site default
Automated import

• Friendlier translation package format
• Batch API for tasks to run in multiple
  HTTP requests
• Insta...
Translatable JavaScript

• Drupal.t() and Drupal.formatPlural()
  to translate strings in JavaScript

• Works with on the ...
Text groups API


• Multiple text groups possible to
  translate user defined content
• This remains a programming API for
...
On-page interface
        translation

• Ability to collect all strings used to
  build the page

• Try localization clien...
Content language
• Any post can have a language
  associated, or can be neutral
• This is configurable per
  content type
•...
Content translation

• Posts can be associated with each
  other, organized into translation sets

• Basic workflow support...
Per-language aliases

• Path aliases can be language
  dependent
• Still fall back to default alias, if no
  specific alias...
Lower level changes

• Multilingual request
  handling made possible
• Emails are sent in the
  language of the user targe...
More for hard-core people


 • Modify some site interface strings by
   adding an array to settings.php
 • No need for loc...
Still no way to translate
• Site settings
• Categories
• User defined menus
• Aggregator categories
• Profile field titles an...
Contributed modules


• i18n and localizer is here to stay
• Many more contributed modules
  can/should use the enhancements
And still...


There is a lot more to
  love in Drupal 6
  (You will hear about these a lot)
New kid on the block
Localization server

• Making interface translation for
  language groups a lot easier
• We are moving from CVS and projec...
Try Drupal 6!

• Drupal 6 beta 1:
  http://drupal.org/drupal-6.0-beta1
• Nightly development snapshot:
  http://drupal.org...
Read the thesis
• http://hojtsy.hu/files/
  GaborHojtsyThesis.pdf
• A summary of i18n related problems
• How Drupal 5, Joom...
Sponsored by


• Development Seed (infrastructure,
  Jose A. Reyero)
• Google Summer of Code (localization
  tools for Dru...
Thanks!


All photos included made by myself in
Hungary, Bonn and Sankt Augustin.
Upcoming SlideShare
Loading in...5
×

Barcelona Multilanguage

4,469

Published on

http://barcelona2007.drupalcon.org/node/201

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,469
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
123
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Barcelona Multilanguage"

  1. 1. Multilingual Drupal from 5 to 6 Gábor Hojtsy September 19., 2007.
  2. 2. About me • Working with Open Source since 1999, was head of PHP.net and the PHP documentation • Developing with Drupal since 2003, multiple contributed modules, Hungarian translations • Drupal 6 core committer
  3. 3. About you • Experienced Drupal site builders? • Who deals with multilingual issues? • Knowledge in both areas?
  4. 4. Concepts
  5. 5. Your target audience • A multilingual web site is available in multiple languages. It is not necessarily an international one. • An international web site is intended to be used internationally. It is not necessarily a multilingual one.
  6. 6. Two terms Internationalization (i18n) is the design and development of a product, application or document content that enables easy localization for target groups that vary in culture, region or language (locale).
  7. 7. Two terms Localization (L10n) is the adaptation of a product, application or document content to meet the language, cultural and other requirements of a specific target market (locale).
  8. 8. Confusions i18n L10n multilingual international
  9. 9. Drupal
  10. 10. Drupal “by design” • There is the built in interface, which is always served from code • You provide everything else (posts, menu items, admin defined blocks, and so on)
  11. 11. Famous issues ๏ Default content type names are not translated ๏ Built-in, but modified menu items are neither ๏ The “Forums” vocabulary title is not translated
  12. 12. Drupal 5
  13. 13. Built into Drupal 5 • Translatable installer • Basic interface language list setup • Runtime interface translation with per user preferences
  14. 14. How does it work? • GNU gettext backend and format used • Translation templates extracted from source code • CVS used to store/release translations • User imports translation files in Drupal (which stores them in the DB)
  15. 15. Recognize the source • t(‘Go to %page’, array(‘%page’ => $p)); • format_plural($count, ‘1 year’, ‘@count years’); • Several special cases: permissions, watchdog type names, and so on
  16. 16. Contributed modules • Autolocale / localized profile • Internationalization module suite • Localizer module suite • XLIFF tools
  17. 17. Computer Aided Translation
  18. 18. Outside Drupal • Content translation works in Drupal • But professionals use different tools • Translation memories • Automated translation • Professional content review
  19. 19. CAT workflow
  20. 20. Drupal implementation
  21. 21. Demo
  22. 22. Drupal 6
  23. 23. Drupal 6 goes forward! • New language subsystem • Easy interface translation import • Performance optimizations • Content translation • Textgroups API
  24. 24. Drupal 6 architecture This was not ready on time, so it is not included.
  25. 25. Languages! • English and native language names • Writing direction (LTR or RTL) • Weights • Path prefix and subdomain setup and recognition
  26. 26. Right to left themes • All CSS file additions are intercepted and RTL cascade files are searched for • Most core themes have RTL support, full support expected in final release
  27. 27. Language detection • Based on the IRI (domain, path) • User preferences • Browser settings • Falls back on site default
  28. 28. Automated import • Friendlier translation package format • Batch API for tasks to run in multiple HTTP requests • Install time import of interface translations • Module/theme changes result in translation imports
  29. 29. Translatable JavaScript • Drupal.t() and Drupal.formatPlural() to translate strings in JavaScript • Works with on the fly string collection or preprocessing • Also brings simple theming to JavaScript
  30. 30. Text groups API • Multiple text groups possible to translate user defined content • This remains a programming API for Drupal 6, not used in the core system
  31. 31. On-page interface translation • Ability to collect all strings used to build the page • Try localization client module for Drupal 6! • Also useful for by-site optimization
  32. 32. Content language • Any post can have a language associated, or can be neutral • This is configurable per content type • Does not mean content translation
  33. 33. Content translation • Posts can be associated with each other, organized into translation sets • Basic workflow supported to check for outdated translations • Translation links, language switcher block • Simple API for content/field types
  34. 34. Per-language aliases • Path aliases can be language dependent • Still fall back to default alias, if no specific alias defined • Examples: ‘home’, ‘honlap’, ‘inicio’
  35. 35. Lower level changes • Multilingual request handling made possible • Emails are sent in the language of the user targeted (API also changed a lot) • Log messages are stored in English, localized on display
  36. 36. More for hard-core people • Modify some site interface strings by adding an array to settings.php • No need for locale module, could be used to customize English sites
  37. 37. Still no way to translate • Site settings • Categories • User defined menus • Aggregator categories • Profile field titles and category names • Content type properties
  38. 38. Contributed modules • i18n and localizer is here to stay • Many more contributed modules can/should use the enhancements
  39. 39. And still... There is a lot more to love in Drupal 6 (You will hear about these a lot)
  40. 40. New kid on the block
  41. 41. Localization server • Making interface translation for language groups a lot easier • We are moving from CVS and project management to a web application • Translation sharing, support for the new packaging format • My presentation: 14h, Sun room
  42. 42. Try Drupal 6! • Drupal 6 beta 1: http://drupal.org/drupal-6.0-beta1 • Nightly development snapshot: http://drupal.org/node/97368 • Report bugs at http://drupal.org/ node/add/project_issue/drupal/bug
  43. 43. Read the thesis • http://hojtsy.hu/files/ GaborHojtsyThesis.pdf • A summary of i18n related problems • How Drupal 5, Joomla 1.0, TYPO3 4.1 and Plone approach these problems • Planning of the Drupal 6 solutions • Not everything ended up implemented as documented there
  44. 44. Sponsored by • Development Seed (infrastructure, Jose A. Reyero) • Google Summer of Code (localization tools for Drupal 6)
  45. 45. Thanks! All photos included made by myself in Hungary, Bonn and Sankt Augustin.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×