Translation in Drupal

Video loading...

  • 0:01
    Translation in Drupal
  • 0:03
    with Amber Matz
  • 0:04
    Let's take a brief look at how translation
  • 0:06
    contributions work in Drupal.
  • 0:08
    First, what is being translated?
  • 0:11
    Well, any string of text in Drupal's user
  • 0:13
    interface-- for example, the login button or add new comment.
  • 0:18
    From a developer's perspective, any string wrapped in the t() function
  • 0:22
    becomes translatable-- button text, field captions,
  • 0:26
    menu item labels, and messages are all translatable strings.
  • 0:30
    Many languages have completed or partially-completed translations of
  • 0:35
    Drupal core's user interface text.
  • 0:38
    In cases where there are partial translations,
  • 0:41
    untranslated text appears in English.
  • 0:44
    Translations may also be provided for contributed projects
  • 0:47
    like modules or themes.
  • 0:50
    No language has a complete set of translations
  • 0:52
    for all contributed projects.
  • 0:54
    So there's always a need for translations
  • 0:57
    of contributed modules or themes.
  • 0:59 is a central service
  • 1:02
    where contributors can maintain localizations of all projects
  • 1:06
  • 1:08
    Let's take a tour of the site and discover how to find and join
  • 1:11
    a translation group, filter translatable strings in
  • 1:15
    projects, suggest a translation, and locate
  • 1:19
    documentation for how to contribute to translations
  • 1:22
    of projects.
  • 1:25
    On the homepage of we get
  • 1:28
    an overview of the site, some helpful
  • 1:30
    links to documentation, a table of all the languages that currently
  • 1:35
    have a group on, their core progress,
  • 1:40
    and the number of contributors that contribute to that language's
  • 1:45
    translation efforts.
  • 1:46
    In the sidebar you can quickly navigate to either the landing page
  • 1:50
    for a language's translation team, or-- if you already
  • 1:53
    know the name of the project you want
  • 1:55
    to contribute to-- fill in the auto complete field
  • 1:58
    and select the appropriate project.
  • 2:01
    Also in the sidebar are some translation-related statistics,
  • 2:05
    news, a link to the issue queue for,
  • 2:09
    and instructions on how to set up a new translation group if you don't
  • 2:13
    see your language already listed.
  • 2:16
    First, let's explore a translation group page.
  • 2:19
    I can either select from the links in this table
  • 2:22
    or I can use the quick navigation box in the right sidebar.
  • 2:26
    I'll use the table and select English, British.
  • 2:31
    And as you can see, this brings us to an overview of the
  • 2:34
    English, British translation group.
  • 2:37
    Now let's navigate to the same page using the quick navigation box.
  • 2:42
    I'll pick a language from the select group here-- English, British.
  • 2:46
    And then I'll click the Go there button.
  • 2:49
    A translation group overview page contains an overview of the group's
  • 2:53
    goals and objectives, documentation, various statistics
  • 2:57
    related to the group, and a list of top translation
  • 3:00
    projects on
  • 3:02
    Before you can start contributing suggestions for translations,
  • 3:05
    you will need to join a group.
  • 3:07
    First navigate to your languages group home page--
  • 3:11
    I'm on the English, British page.
  • 3:13
    And in the sidebar there's a link or button to join the group.
  • 3:18
    I'll click that button.
  • 3:19
    It'll ask me if I'm sure I want to join.
  • 3:22
    And I'll click Join.
  • 3:23
    And now I get a message confirming that I am now a member
  • 3:26
    of the British English team.
  • 3:29
    In some select groups membership is restricted
  • 3:31
    and the button will say instead, request membership.
  • 3:35
    You can see this on the test groups page, for example.
  • 3:38
    If you wanted to help out with bug testing,
  • 3:41
    you could request membership to this group
  • 3:43
    here by clicking request membership.
  • 3:45
    To actually view all of the strings and their translations
  • 3:48
    on, you need to view
  • 3:51
    a project within a language group.
  • 3:54
    Let's head back to the translations home page
  • 3:57
    and select a project using the quick navigation box in the sidebar.
  • 4:01
    First I'll select a language-- English, British--
  • 4:04
    which is already selected for me after I
  • 4:06
    joined the British English team.
  • 4:08
    And now I'll pick a project.
  • 4:10
    I'll choose Drupal core.
  • 4:12
    And I'll click the Go there button.
  • 4:14
    Now let's find the translatable strings for a project.
  • 4:17
    There are a number of different ways you can filter the results here,
  • 4:20
    including filtering by project, release, or context-- if a module
  • 4:25
    was using the context module and you knew what the ID of that context
  • 4:29
  • 4:30
    I'll click this Reveal more filters link.
  • 4:34
    There are two types of statuses that you
  • 4:37
    can filter by-- whether a string is untranslated, translated,
  • 4:42
    or is a translation.
  • 4:44
    Or you can filter for suggestions-- whether a string has a suggestion,
  • 4:49
    does not have a suggestion, or actually is a suggestion.
  • 4:54
    It's also possible to filter by contributor.
  • 4:57
    Just fill in this auto complete field
  • 4:59
    and select the translator's username.
  • 5:02
    Contains lets you filter by a string or substring.
  • 5:07
    So since we're here in the British English group,
  • 5:10
    let's filter for a word that commonly appears in Drupal messages
  • 5:14
    and has a counterpart and different spelling in British English,
  • 5:18
    the word authorize.
  • 5:21
    I'll click Filter.
  • 5:23
    And now we can see all of the translatable strings that have
  • 5:26
    the word authorize spelled with a z-- or zed, as it were--
  • 5:30
    and what translations are available of those strings.
  • 5:34
    The page can take a moment to load, so be patient.
  • 5:38
    And now we can see on the left-hand column the source text,
  • 5:42
    and on the right-hand column the translations.
  • 5:46
    You can see which suggestions are being used because they're selected
  • 5:49
    with the radio button here.
  • 5:52
    You can also see cases where the string is untranslated
  • 5:55
    but there is only a suggestion.
  • 5:57
    Only someone with the role translation community moderator
  • 6:01
    can approve a suggestion.
  • 6:03
    After a suggestion is approved, it will
  • 6:04
    become part of the downloadable translation for that language.
  • 6:08
    If a translatable string doesn't have a translation,
  • 6:11
    or either the selected translation or the suggestions
  • 6:14
    seem incorrect to you, you can suggest
  • 6:17
    a new translation string for consideration
  • 6:19
    by the translation group's moderators.
  • 6:21
    Let's take one of these strings that contain
  • 6:24
    the word authorize spelled with a z and suggest a translation.
  • 6:28
    I can only suggest a translation here
  • 6:30
    because I've joined the group, so if you want to suggest translations,
  • 6:34
    don't forget that first step of joining the group.
  • 6:37
    Note that even though I'm only changing one word,
  • 6:41
    I will need to include the entire string in my suggestion.
  • 6:44
    When I'm ready to suggest a translation,
  • 6:46
    on the left-hand column there's this icon with a pencil and an arrow.
  • 6:50
    And if you hover over it, the text says translate.
  • 6:53
    Click that button and the entire text appears in the suggestion box.
  • 6:59
    So there's not really even an option to only translate one word.
  • 7:04
    It makes it really easy, it just copies over the entire string.
  • 7:07
    I'm going to change the spelling of authorize to use an s instead.
  • 7:13
    And now at the bottom of the page I'll click Save Changes.
  • 7:17
    After clicking Save Changes, I get a message at the top of the page
  • 7:21
    saying, "one suggestion added."
  • 7:23
    So you can go through and quickly add translations
  • 7:27
    for multiple strings all at once, but then at the end of the page
  • 7:32
    click the Save Changes.
  • 7:33
    So you don't need to do it one at a time.
  • 7:35
    You can also suggest strings within the context of a Drupal site
  • 7:39
    by downloading the localized Drupal distribution,
  • 7:42
    setting up an API key, and translating missing strings
  • 7:46
    by clicking around on your local installation of Drupal
  • 7:49
    and submitting suggestions using the Localization Client interface.
  • 7:53
    Instructions for setting this up may be found
  • 7:56
  • 8:02
    There are many resources for accessing translations
  • 8:05
    and contributing back translations.
  • 8:07
    You can find these links in the introductory text
  • 8:09
  • 8:12
    You can learn how to install Drupal localize with translations
  • 8:15
    using the localized Drupal installation
  • 8:17
    profile-- or distribution, rather.
  • 8:20
    You can also set up your local installation
  • 8:23
    to contribute to translations right from your Drupal site.
  • 8:27
    For already-installed sites, you can use the Localization Update
  • 8:30
    module to download the right translation
  • 8:32
    files for the right projects that you use.
  • 8:34
    You can also learn about how works
  • 8:38
    and how you contribute to it in the handbooks.

Translation Contribution for Drupal


Do you want to know how to contribute translations to Drupal core or other contributed modules and themes? Have you ever wondered how translations are managed in Drupal? It all happens in the community at This tutorial gives a tour of and then teaches you how to join translation groups and contribute translated strings back to the Drupal community.

Additional resources: