Watch videos with subtitles in your language, upload your videos, create your own subtitles! Click here to learn more on "how to Dotsub"

Translating Configuration

0 (0 Likes / 0 Dislikes)
Translating Configuration with Amber Matz In this tutorial, we’ll walk through the process of translating configuration. By the end of this tutorial, you'll understand how to translate the labels on the Recipe view page into Spanish. To follow along, you should understand the concept of user interface, content, and configuration translation in Drupal, and know how to create a content listing view. On the demo site, the core Configuration Translation module must be installed and your site must have at least 2 languages. Finally, the Recipes view must exist. See the written version of this tutorial for links to the prerequisites. The basic steps for translating any configuration on your site are, first, 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. So, let’s navigate to Configuration, then Basic site settings. Then, you would find a link, tab, or button on the page that says Translate or something similar. You would click this link, tab, or button. In the case of this site information page, we’d click on this tab, Translate system information. Then, you would find a button that will let you add a translation in the desired language, and then, you would click this button. For example, we’d click the Edit button in the row for the Spanish language. Then, you would enter the translation in the form and Save. For example, for Site name, I’d enter the Spanish translation, and for the slogan, I’d enter the translation as well. Then, I would click Save Translation. Most configuration is fairly straightforward and intuitive to edit in this manner. However, 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. Let’s take a look at how we might translate a view and translate the labels in the Recipes view to Spanish. In the Manage administrative menu, navigate to Structure, then Views. Locate the Recipes view. Then, drop down this Operations menu and select Translate. Under Operations and in the row for Spanish, click the Add button. The Add Spanish translation for Recipes view page appears. Under Displays, then Master Display Settings, click on this heading to expand the field set. Then, also expand Recipes default display options. Scroll down, and for the Display title, let’s enter the translation for Recipes. Next, still under Master Display Settings and Recipes default display options, expand the Exposed form, and also the Reset options, and let’s translate the Submit button text from Apply to Applicar. The other buttons and labels in this section do not appear in the Recipes page or block, and do not need to be translated. Next, under Filters, still in this section, expand the (EMPTY) Taxonomy Term ID, and the Find Recipes Using… Expose, and let’s translate this label. Now click Save translation. Navigate to the Recipes page by clicking Back to site, then clicking the Recipes tab from the main menu. Click on the language switcher block to select Español. You can now see our translated labels and titles including the Submit button. To expand your understanding of this topic, translate the block display title in the Recent Recipes display settings section of the Recipes view, and translate the page title in the Vendors view. Here’s another hint, use the User Guide’s own language switcher block on the corresponding tutorials where we originally set those values to see the configuration values in Spanish. For example, if you navigate to Basic Site Configuration in Chapter 4, then Editing Basic Site Information, you can see the table of values in English. Click Español in the language switcher block to see the values in Spanish. You could repeat this step and find the applicable tutorial where those labels are originally set. Then, click the language of your choice, like Español in the language switcher block of the user guide, to find the values in Spanish. See the written version of this tutorial for other configuration translation ideas and links to related tutorials. In this tutorial, we translated the labels on the Recipes view page into Spanish.

Video Details

Duration: 5 minutes and 10 seconds
Country: United States
Language: English
License: All rights reserved
Genre: None
Views: 2
Posted by: drupalizeme on Dec 1, 2017

Translating Configuration

Caption and Translate

    Sign In/Register for Dotsub to translate this video.