10.5. Translating Configuration
- The core Configuration Translation module must be installed, and your site must have at least two languages. See 第 10.2 节 “Adding a Language”.
- The Recipes view must exist. See 第 9.3 节 “Creating a Content List View” and 第 9.4 节 “Duplicating a View”.
The basic steps for translating any configuration on your site are:
- Locate the page where the configuration you want to translate is created or edited in the site’s primary language. For example, to translate the site name, you need to find the page where you would edit the site name (see 第 4.2 节 “Editing Basic Site Information”).
- Find a link, tab, or button on the page that says "Translate" or something similar. Click this link, tab, or button.
- Find a button that will let you add a translation in the desired language, and click this button.
- Enter the translation in the form, and save.
Most configuration is fairly straightforward and intuitive to edit in this manner. Views configuration is an exception, because the translation editing form is nothing like the view editing form, and it is complex and hierarchical rather than being a simple form with just a few fields. As an example of how to translate a view, here are the steps to translate the labels in the Recipes view to Spanish:
- In the Manage administrative menu, navigate to Structure > Views (admin/structure/views).
- Locate the Recipes view and click Translate from the dropdown button.
- Click Add in the row Spanish. The page Add Spanish translation for Recipes view appears.
- Find Displays > Master Display settings > Recipes default display Options. Translate the Display title from "Recipes" to "Recetas".
Find Displays > Master display settings > Recipes default display options > Exposed form > Reset options. Translate Submit button text (Apply) to "Applicar". The other buttons and labels in this section do not appear on the Recipes page or block, and do not need to be translated.

- Find Displays > Master display settings > Recipes default display options > Filters > (Empty) taxonomy term ID > Find recipes using… Expose. In the Label field, enter "Encontrar recetas usando…".
- Click Save translation.
- Navigate to the Recipes page and switch to Spanish using the Language switcher block. Verify that the labels have been translated.
- Translate the block display title in the Recent recipes display settings section of the Recipes view.
- Translate the page title in the Vendors view.
Translate other configuration. Some examples of where to find the translation pages:
- To translate the site name, navigate in the Manage administrative menu to Configuration > System > Basic site settings > Translate system information (admin/config/system/site-information/translate).
- To translate the contact form, navigate in the Manage administrative menu to Structure > Contact forms (admin/structure/contact). Click Translate in the dropdown button in the Website feedback row.
- To translate the name of a menu, navigate in the Manage administrative menu to Structure > Menus (admin/structure/menu). Click Translate in the dropdown button for the menu whose name you want to translate.
- Menu items within a menu are considered to be content (not configuration); see 第 10.3 节 “Configuring Content Translation” to enable translation. Once translation is enabled, navigate in the Manage administrative menu to Structure > Menus (admin/structure/menu). Click Edit menu in the dropdown button for the menu whose links you want to translate. Click Translate in the dropdown button for the link you want to translate.
- To translate field labels on a content type, navigate in the Manage administrative menu to Structure > Content types (admin/structure/types). Click Manage fields in the dropdown button for the content type whose field labels you want to edit. Click Translate in the dropdown button for the field whose label you want to edit.
- Translate content. See 第 10.4 节 “Translating Content”.
Attributions
Written and edited by Boris Doesborg and Jennifer Hodgdon.
Source file: language-config-translate.asciidoc
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion