Table of Contents for
Drupal 8 Quick Start Guide

Version ebook / Retour

Cover image for bash Cookbook, 2nd Edition Drupal 8 Quick Start Guide by J. Ayen Green Published by Packt Publishing, 2018
  1. Drupal 8 Quick Start Guide
  2. Title Page
  3. Copyright and Credits
  4. Drupal 8 Quick Start Guide
  5. Dedication
  6. Packt Upsell
  7. Why subscribe?
  8. Packt.com
  9. Contributors
  10. About the author
  11. About the reviewers
  12. Packt is searching for authors like you
  13. Table of Contents
  14. Preface
  15. Who this book is for
  16. What this book covers
  17. To get the most out of this book
  18. Download the color images
  19. Conventions used
  20. Get in touch
  21. Reviews
  22. Finding Your Way around Drupal
  23. Installing Drupal
  24. Readying the environment
  25. Running the Drupal installation script
  26. Site information
  27. Site maintenance account
  28. Regional settings
  29. Update notifications
  30. The behind-the-scenes tour
  31. Administration menu
  32. Tabs
  33. System message area
  34. Search widget
  35. User menu
  36. Main navigation
  37. Main content area
  38. Summary
  39. Structuring Content Types
  40. What is content?
  41. Content as fields
  42. Understanding content types
  43. Defining the content type
  44. Submission form settings
  45. Publishing options
  46. Display settings
  47. Menu settings
  48. Managing content type fields
  49. Designing a content type
  50. Content type settings
  51. Fielding the content type
  52. Field types
  53. Our content type field
  54. Adding fields to the content type
  55. Summary
  56. Managing Users
  57. User types
  58. User roles
  59. Managing permissions
  60. Users
  61. Creating a user account
  62. Summary
  63. Creating and Editing Content
  64. Using the WYSIWYG editor
  65. Title*
  66. Body
  67. Summary Field
  68. Body text
  69. Text format
  70. Tags
  71. Images
  72. Publishing the content
  73. Additional settings
  74. Revision log message
  75. Menu Settings
  76. Comment Settings
  77. URL Path Settings
  78. Authoring Information
  79. Promotion Options
  80. Completing the process
  81. Summary
  82. Making Drupal Even More Useful
  83. Pathauto
  84. Paragraphs
  85. Content moderation
  86. States
  87. Transitions
  88. Workflow application
  89. Summary
  90. Grabbing Global Readership
  91. Declaring additional languages
  92. Translating content
  93. User language selection
  94. Translating the user interface
  95. Summary
  96. Feeding the Masses – RSS
  97. Why feeds?
  98. Selecting content for a feed
  99. Modifying content for feed selection
  100. Pick-me flags
  101. Tags
  102. Views
  103. Creating the container view
  104. Creating the Pets feed
  105. Display name
  106. Title
  107. Format
  108. Feed settings
  109. Filtering the criteria
  110. Sort criteria
  111. Creating the Travel feed
  112. Title
  113. Feed settings
  114. Format
  115. Filtering criteria
  116. Creating the Leftovers feed
  117. Title
  118. Feed settings
  119. Format
  120. Filtering criteria
  121. Creating the Feed Links block
  122. Summary
  123. Welcome Home!
  124. BAD home page!
  125. Design improvements
  126. Too much content!
  127. No access to content
  128. No RSS feeds menu
  129. We need a Terms and Conditions page
  130. Making the changes
  131. Improving the Frontpage view
  132. Title
  133. Format
  134. Fields
  135. Filtering criteria
  136. Block settings
  137. Pager
  138. Adding an Archive
  139. Adding the RSS Feeds menu
  140. Fixing the Footer menu
  141. Summary
  142. Other Books You May Enjoy
  143. Leave a review - let other readers know what you think

Translating content

In this section, we'll create a short new article to use for our example. Navigate to /node/create/article. For my title, I'll enter My Favorite Time. For the body, I've put Dawn is my favorite time of the day. Note that below the Body text field there is a language selector. Since it is defaulting to English, I'll leave it unchanged and save my article. If you still have Content moderation active, don't forget to save your article as Published rather than Draft.

In order to provide content translations, we need to enable Content translation. Let's navigate to Extend (/admin/modules) and do that. 

With content translation enabled, we have two ways in which to begin a translation: the Translate tab, that will now be present beside the View, Edit, and Delete tabs when viewing the content, or, as a Translate option via the admin content page, /admin/content, on each Operations selection. Use either to proceed to the translations list for your article.

My translations list looks like this:

Each piece of content will have rows corresponding to each configured language. The status column identifies whether the content has been translated to that language. If it has, there will be an Edit button. If not, there will be an Add button. I'll click Add in the row for the Spanish translation.

When clicked, the familiar form for editing a node appears. In fact, it appears with the content already filled in for each field. You might think that something is amiss, because there was not supposed to be a translation yet for this language, but there is content instead of empty fields, and it's not the correct language. Don't panic! The content is supposed to be present for you to see what actually needs to be translated, rather than trying to remember. It will appear in the default language. I'm going to translate the title and body text. My form will now look as it does in the following screenshot. Once your translated content seems ready, click the Save (all translations) button:

Having saved this translation, the translation list for my content now shows Español, with its translated title, as being published. Next, I'll create a Hebrew translation and save it. The content edit form looks different, because with a right-to-left language, the text fields appear on the right and the metadata fields on the left:

And that's it! The content is now available in three languages (in the next section, we will discuss how a user accesses them). 

How does this work behind the scenes? When Drupal stores the field information in the database, part of the index used to find that information is code referring to the language. When you create the content, initially, a node ID—an integer value—is assigned to it. Regardless of how many language translations you create, the node ID remains the same. So, the index for the English version might include the code en for English, es for Spanish, and he for Hebrew.

You might be wondering, how does the user select the desired language? That's what we'll be covering next!