Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 551423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:23:32+00:00 2026-05-13T11:23:32+00:00

I have multi-language website in Drupal, but not all content is translated. I want

  • 0

I have multi-language website in Drupal, but not all content is translated. I want the language switcher block to appear in a content page only if there’s a translation for that content.

The language switcher block uses the function translation_path_get_translations to get the path of the translated version of the content being viewed. If there’s no translated paths, the block does not print the switcher.

The problem is that sometimes the translated version is under the same path that the original content (e.g. when it’s a view or a module-generated content). In this case, although translation_path_get_translations doesn’t return any translated path, the language switcher should be printed, because the view or module will take care of the translation.

For example, these are the paths of a translated content:

english/content-path-here
portuguese/conteudo-aqui

And these are paths of a content generated by a view or module:

english/foobar
portuguese/foobar

So, is there a way to solve this? Maybe a way to determine if a given path is a “real content” (and not a view/module)?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:23:32+00:00Added an answer on May 13, 2026 at 11:23 am

    hmm, i think it’s possible only manually by paths.
    May be help this:

    
    if ((arg(0) == 'node') && is_numeric(arg(1))) {
      // that show you are on single node, and you can show block for translation
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a multi-language website. I want a module to add multiple version of
I have a Drupal 7 multi-language(3) website. I have installed the Internationalization (7.x-1.0-beta2) module.
I have a multi-language website and I'm puting the language in the URL like
I have a multi-language website that makes use of pretty URLs, so called search-engine-friendly
I have a multi language website which requires both English language and Azeri characters
I have a website on Kohana and I'm planning to have it multi-language. Now
I have this content structure for a multi language site. Content Danish Forside Om
I have a multi-language system, and all over the place I have what I
I have started to code a multi-language feature for a medium-sized website with a
I'm building multi-language support for PHP page. Let's say I have a page url:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.