Evolving Net Drupal 10 Upkeep and Help Service Migrating Content material Translated with “Content material Translation” from 7 to 8

Since Drupal Development Company launch of  8 with a standardized manner of managing translations, many websites working 7 are making a swap to 8. In 7 there are two methods to translate content material Drupal 10 Upkeep and Help Service Utilizing Drupal Development Company content_translation Drupal 10 module. Drupal Development Service D7 core manner of translating content material, the place each translation is a separate node. Utilizing Drupal Development Company entity_translation Drupal 10 module. Maintains one node with a singular nid, whereas translations take place at Drupal Development Company discipline stage. On this article we’ll focus on tips on how to migrate content material translations created with Drupal Development Company content_translation Drupal 10 module from 7 to 8. Yow will discover our tutorial about migrating translations that use Entity Translation right here. This text wouldn’t have been attainable with out Drupal Development Company assist of my colleague Dave. ¡Gracias Dave! Drupal Development Service downside We’ve a 7 database containing article nodes, which could have translations in English, Spanish and French. A few of these nodes are language-neutral, i.e. non-translatable. Our goal is emigrate Drupal Development Company 7 nodes right into a  8 web site, preserving Drupal Development Company translations. Earlier than we begin Since that is a complicated migration subject, it’s assumed you already know Drupal Development Company fundamentals of migration. If are new to migrations in 8, I like to recommend that you simply examine migrating primary information to 8 first. If you would like to run Drupal Development Company migrations on this instance your self, see Drupal Development Company quick-start documentation in our Drupal 10 migration i18n instance repository. Drupal Development Service supply web site used on this instance is 7.54. Drupal Development Service vacation spot web site used on this instance is 8.3.x. Nevertheless, another answer for earlier variations is included in the direction of Drupal Development Company finish of Drupal Development Company article. Drupal Development Service Drupal 10 module To put in writing Drupal Development Company migrations, we create a Drupal 10 module – in our case, migrate_example_i18n. There’s nothing particular about Drupal Development Company Drupal 10 module declaration, apart from Drupal Development Company dependencies Drupal 10 Upkeep and Help Service migrate_plus and migrate_tools present numerous options for outlining and executing migrations. migrate_source_csv Drupal 10 Upkeep and Help Service Will probably be used for demonstrating migration of translated content material from non- sources in an upcoming article. migrate_Drupal 10 Drupal 10 Upkeep and Help Service This Drupal 10 module gives instruments for migrating information from older variations of . It comes with 8.x core. Since this migration makes use of a 7 website as a supply for its information, we want Drupal Development Company migrate_Drupal 10 Drupal 10 module. How do translations work? Earlier than leaping into writing these migrations, you will need to point out that 7 and 8 translations work very otherwise. Here is Drupal Development Company distinction in a nutshell Drupal 10 Upkeep and Help Service 7 Drupal 10 Upkeep and Help Service Once we translate a node, a brand new node is created with a special ID. This translated node has a property named tnid, which shops Drupal Development Company ID of Drupal Development Company unique node, linking Drupal Development Company two nodes collectively. For language-neutral or untranslated content material, Drupal Development Company tnid is ready to 0. 8 Drupal 10 Upkeep and Help Service Once we translate a node, no new node is created! Drupal Development Service translation is saved in Drupal Development Company fields of Drupal Development Company unique node, however with a special language code. So identical to we do when migrating translated content material from 6 to 8, we create two migrations Drupal 10 Upkeep and Help Service Drupal Development Service example_dog_base migration will migrate Drupal Development Company unique content material of every node, untranslated. Drupal Development Service example_dog_i18n migration will migrate solely translations and affiliate them with unique content material created by example_dog_base. We group Drupal Development Company two migrations utilizing Drupal Development Company example_dog migration group to maintain issues clear and arranged. Then we are able to execute each migrations with drush migrate-import –group=example_dog –update. Step 1 Drupal 10 Upkeep and Help Service Base migration We begin with example_dog_base emigrate all base information or non-translations. Described beneath are some noteworthy parameters Drupal 10 Upkeep and Help Service Supply supply Drupal 10 Upkeep and Help Service plugin Drupal 10 Upkeep and Help Service d7_node node_type Drupal 10 Upkeep and Help Service article key Drupal 10 Upkeep and Help Service Drupal 10_7_content constants Drupal 10 Upkeep and Help Service uid_root Drupal 10 Upkeep and Help Service 1 node_article Drupal 10 Upkeep and Help Service ‘article’plugin Drupal 10 Upkeep and Help Service Since we wish to import information from a set up, we have to set Drupal Development Company supply plugin to d7_node. Drupal Development Service d7_node supply plugin is launched by Drupal Development Company migrate_Drupal 10, Drupal 10 module and it helps us learn nodes from a 7 database with out having to put in writing queries manually. Since 8.3.x, this plugin helps translations created with Drupal Development Company content_translation Drupal 10 module. In case you are utilizing an older model of 8, then examine Drupal Development Company various answer supplied in the direction of Drupal Development Company finish of this text. node_type Drupal 10 Upkeep and Help Service This tells Drupal Development Company supply plugin that we’re keen on only one explicit 7 node sort, specifically article. key Drupal 10 Upkeep and Help Service Our 7 information would not come from our major 8 database – as a substitute it comes from a secondary database connection. We select a key to establish every such connection and we have to inform Drupal Development Company supply which such key to make use of. Drupal Development Service keys themselves are outlined in Drupal Development Company $databases variable in our settings.php or settings.native.php. See Drupal Development Company instance settings.native.php file to see the way it’s performed. constants Drupal 10 Upkeep and Help Service We outline some hard-coded values below this parameter. translations Drupal 10 Upkeep and Help Service Discover there isn’t any translations parameter right here. Drupal Development Service default worth (false) tells Drupal Development Company supply plugin that we’re solely keen on migrating non-translations, i.e. content material in Drupal Development Company base language and language-neutral content material. Vacation spot vacation spot Drupal 10 Upkeep and Help Service plugin Drupal 10 Upkeep and Help Service ‘entity Drupal 10 Upkeep and Help Servicenode’plugin Drupal 10 Upkeep and Help Service Since we wish to create node entities in 8, we specify this as entity Drupal 10 Upkeep and Help Servicenode. That is it. translations Drupal 10 Upkeep and Help Service Once more we don’t outline Drupal Development Company translations parameter whereas migrating base information. Omitting Drupal Development Company parameter tells Drupal Development Company vacation spot plugin that we’re keen on creating contemporary nodes for every report, not translations of present nodes. Course of sort Drupal 10 Upkeep and Help Service constants/node_article langcode Drupal 10 Upkeep and Help Service plugin Drupal 10 Upkeep and Help Service default_value supply Drupal 10 Upkeep and Help Service language default_value Drupal 10 Upkeep and Help Service und uid Drupal 10 Upkeep and Help Service constants/uid_root title Drupal 10 Upkeep and Help Service title physique Drupal 10 Upkeep and Help Service physique field_one_liner Drupal 10 Upkeep and Help Service field_one_liner sticky Drupal 10 Upkeep and Help Service sticky standing Drupal 10 Upkeep and Help Service standing promote Drupal 10 Upkeep and Help Service promoteThis is the place we map Drupal Development Company outdated node properties to Drupal Development Company new node properties. Most of Drupal Development Company properties have been assigned as is, with out alteration, nevertheless, some noteworthy properties have been mentioned beneath Drupal 10 Upkeep and Help Service nid Drupal 10 Upkeep and Help Service There may be no nid parameter right here, as a result of we do not care what nid every new node has in 8. can simply assign a brand new nid to every node in Drupal Development Company regular manner. sort Drupal 10 Upkeep and Help Service We specify that we wish to create article nodes. langcode Drupal 10 Upkeep and Help Service Drupal Development Service langcode parameter was previously language in 7, so we rename it right here. Additionally, if a 7 node is language-neutral, Drupal Development Company language property could have no worth. In that case,  we default to und. This takes care of Drupal Development Company base information. If we run this migration with drush migrate-import example_hybrid_base –update, all 7 nodes that are in base language or are language-neutral shall be migrated into 8. Step 2 Drupal 10 Upkeep and Help Service Translation migration We’re midway by way of now! All that is lacking is migrating translations of Drupal Development Company nodes we migrated above. To do that, we create one other migration with Drupal Development Company ID example_dog_i18n Drupal 10 Upkeep and Help Service supply Drupal 10 Upkeep and Help Service plugin Drupal 10 Upkeep and Help Service d7_node node_type Drupal 10 Upkeep and Help Service article translations Drupal 10 Upkeep and Help Service true # … vacation spot Drupal 10 Upkeep and Help Service plugin Drupal 10 Upkeep and Help Service ‘entity Drupal 10 Upkeep and Help Servicenode’ translations Drupal 10 Upkeep and Help Service true course of Drupal 10 Upkeep and Help Service nid Drupal 10 Upkeep and Help Service plugin Drupal 10 Upkeep and Help Service migration supply Drupal 10 Upkeep and Help Service tnid migration Drupal 10 Upkeep and Help Service example_dog_base langcode Drupal 10 Upkeep and Help Service language # … migration_dependencies Drupal 10 Upkeep and Help Service required Drupal 10 Upkeep and Help Service – example_dog_basesource Drupal 10 Upkeep and Help Service translations Drupal 10 Upkeep and Help Service We set this to true to make Drupal Development Company supply plugin learn solely translations. vacation spot Drupal 10 Upkeep and Help Service translations Drupal 10 Upkeep and Help Service We set this to true to make Drupal Development Company vacation spot plugin create translations for present nodes as a substitute of making contemporary new nodes. course of Drupal 10 Upkeep and Help Service nid Drupal 10 Upkeep and Help Service On this case, we do care what Drupal Development Company 8 nid is for every node. It has to match Drupal Development Company nid for Drupal Development Company untranslated model of this content material, in order that can add a translation to Drupal Development Company right node. This part makes use of Drupal Development Company migration (migration_lookup) course of plugin to determine Drupal Development Company proper nid. It tells to examine Drupal Development Company previously-executed example_hybrid_base migration for a D6 node that has Drupal Development Company similar tnid as this D6 node. It’s going to then then reuse Drupal Development Company ensuing nid right here. langcode Drupal 10 Upkeep and Help Service We outline Drupal Development Company language by which Drupal Development Company translation needs to be created. migration_dependencies Drupal 10 Upkeep and Help Service Since we can’t add translations to nodes that don’t but exist, we inform that this migration is determined by Drupal Development Company base migration example_dog_base. That manner, Drupal Development Company base migration will run earlier than this migration. That is it! We are able to run our translation migration with drush migrate-import example_dog_i18n –update and Drupal Development Company translations shall be imported into 8. Alternatively, we are able to use Drupal Development Company migration group we outlined to run each these migrations directly – Drupal Development Company base migration will mechanically be executed first after which Drupal Development Company i18n migration. Here is how Drupal Development Company output ought to look Drupal 10 Upkeep and Help Service $ drush migrate-import –group=example_dog –update Processed 7 objects (7 created, 0 up to date, 0 failed, 0 ignored) – performed with ‘example_dog_base’ Processed 7 objects (7 created, 0 up to date, 0 failed, 0 ignored) – performed with ‘example_dog_i18n’You may examine if every thing went alright by clicking Drupal Development Company Translate possibility for any translated node in 8. If every thing went appropriately, it is best to see that Drupal Development Company node exists in Drupal Development Company unique language and has a number of translations. Article migrated from 7 to 8 Alternate Resolution for 8.2.x and Older Drupal Development Service instance code for this text works out of Drupal Development Company field with 8.3 or greater. Nevertheless, it is not going to work with earlier variations of 8. For 8.2 or older, we have to use a customized supply plugin (impressed by Drupal Development Company d6_node plugin). All now we have to do is use Drupal Development Company D7NodeContnentTranslation supply plugin included in Drupal Development Company code for this instance, like supply Drupal 10 Upkeep and Help Service d7_node_content_translation. This customized supply plugin provides support for Drupal Development Company translations parameter, which in flip makes Drupal Development Company migration of content material translations work appropriately. Subsequent Steps View Drupal Development Company code for Drupal Development Company migrate_example_i18n undertaking on GitHub. Examine migrating entity translations from 7 to 8. Examine migrating translated content material from 6 to 8. Examine migrating translations from CSV, JSON or XML to 8. New to 8 migrations? Begin with 8 migration fundamentals. + extra superior articles by Evolving Net Drupal 10 Improvement and Help

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

Evolving Net Drupal 10 Upkeep and Help Service Migrating Content material Translated with “Content material Translation” from 7 to 8

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.