[Drupal] Handle duplication with multiple languages in Drupal sites
BY deepak.r
4 years ago
0 comments comment

We are all aware about the search engines like Google, Yahoo, Yantex, Bing, etc. will blacklist the sites (In case of websites), if duplicate content has been identified. While we are establishing the business to world, we may require to implement country specific domains and multilingual support in the websites. Nobody will take care of how the search engines consider all those pages.

These search engines also provide different methods to notify them, about the duplicate content. To handle the duplication of contents in multi-domain sites 'rel=canonical' can be used. Google has put forward rel="alternate" hreflang="x" to handle multiple languages in the site.

Add links of other language versions in the header of every pages in the site.

Eg : "<link rel="alternate" hreflang="es" href="http://example.com/es" />" 

In Drupal the efficient way to implement a multilingual site is using entity translation module

Implementing hreflang with entity translation module is very easy. Install the 'hreflang' module which implements hook_page_build() and hook_language_switch_links_alter().

Hope this will help. Have a try!



on 24th January 2012 / by webmaster
By default Drupal 7 has two types of views - The Full node view and the Teaser view. This has been the case for all previous versions of Drupal. However if your requirements are different, then you might have to create a custom view that is tailored to meet your specific needs. Check out how to create a simple custom “View mode” for nodes in Drupal 7. Web Development Drupal Drupal Development Drupal 7 Leave a reply Your email address will not be published. Required fields are marked * uk (not verified) access_time 21 Nov 2019 - 14:22 Hi, It would be good if you rename the preprocess function tdbcustom_preprocess_node to CustomModule_preprocess_node Thanks, UK. webmaster access_time 21 Nov 2019 - 14:22 In reply to Hi,It would be good if you by uk (not verified) Thanks for the suggestion. Corrected the module name in the sample code. Add new comment
Leave a reply
Your email address will not be published. Required fields are marked *

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
The content of this field is kept private and will not be shown publicly.
CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.