Internationalization (i18n) with Drupal

Objectives

  • bilingual site (English/French)
  • clean URLs prefixed with language
    • /en/an-english-page
    • /fr/une-page-en-francais
  • link pages to their translation in the other language

Installation

  • Enable modules Content Translation, Locale and Pathauto.

Configuration

Languages

  • /admin/settings/language/configure: Language negotiation -> Path prefix only.
  • /admin/settings/language/edit/en: set Path Prefix to en
  • /admin/settings/language/add: add French
  • /admin/settings/language/add: add German
  • /admin/settings/language/overview: select German as default language (reason: links to pages in default language don't have any language prefix.) From now, access admin pages with en/admin

Enable translations for content types

Example: /en/admin/content/node-type/page -> Workflow settings -> Multilingual support -> Enabled, with translation

URLs

  • /en/admin/build/path/pathauto -> Node paths -> Default path pattern
[title-raw]

Content creation

  • when creating contents, select language. Example: /node/add/page -> Language -> English

Feedback