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

  • SEARCH
  • Home
  • 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 6998517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:25:17+00:00 2026-05-27T20:25:17+00:00

I have a drupal English/French website. I have a custom content type called ‘ad’

  • 0

I have a drupal English/French website.
I have a custom content type called ‘ad’ with all sort of fields.
I have created the file ‘node–ad.tpl.php’ in my theme directory
to customize the display of the ‘ad’ content.
I use pixture reloaded theme and DRUPAL 7.

I am trying to translate fields (both labels and values)
by using ‘field translation’ module.

Field translation works when I CREATE or MODIFY a content via admin.

However, when I DISPLAY a content of type ‘ad’, fields are not translated.
This is because drupal calls to ‘node–ad.tpl.php’ and the translation
module is probably not invoked.
When deleting ‘node–ad.tpl.php’, drupal calls the default node.tpl.php
with a similar results.

Any help would be appreciated,
Thanks in advanced,

Notes :
1 – I correctly activated every dependencies for the module.
2 – User interface translation correctly works.

  • 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-27T20:25:18+00:00Added an answer on May 27, 2026 at 8:25 pm

    OK
    I found out myself how to do this.
    I give the solution here.
    It may help for others :

    First, translate field labels and values in Configuration > Regional and language > Translate > Import. Do not import values as Fields but as User Interface. Do not specify
    an URL (only msgstr and msgid).

    Now, you need to add your t() function in the node.tpl.php for the translation to be effective. So :

    In the node.tpl.php file, if you want to translate field label, write this :
    $content[‘field_my_field’][‘#title’] = t($content[‘field_my_field’][‘#title’]);

    Then to translate field value do this :
    $content[‘field_my_field’][“#items”][0][‘value’] = t($content[‘field_my_field’][“#items”][0][‘value’]);

    You can now render your field : print render($content[‘field_my_field’]);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Drupal I have the page content type. I have created a vocublary and
I have multi-language website in Drupal, but not all content is translated. I want
I have a Drupal setup like this: Content type: Apartments Vocabulary: Areas , that
we have drupal 6 project where one separate content type is AUTHOR where we
I have Drupal with CCK, I have a content type named Article. This Article
I have drupal based website (Drupal version is 6.19), it is very heavy content
I have Drupal 6 website which is using FCK Editor as HTML editor. It
Right now I have a Drupal site where I'm integrating a custom front-end interface
I have custom drupal module. I receive result from a webservice that I need
I have this drupal website that revolves around a document database. By design you

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.