Hi all,
could someone tell me the best way to avoid translation of certain fields in a node?
I have a node type declared by a module I written and I am able to set it as translatable and get translation working, but I would like to avoid some fields I have (e.g. Code) to being translated.
As far as I can see I could check in the module if the node is being translated or is the "main" node maybe using the op "prepare translation" and the $node->tid value to understand if I have to hide some form vars.
I would now if there is a better way where I can simply declare some vars as untranslatable....

Ty

Comments

subcomandante’s picture

hmm, even worse, seems my additions in hook_load went ignored so I cannot add my personalized fields loaded from another tabke to the translated node hoping aving them tranlsated..

Errata Corrige: seems my man is translation_source

ddorian’s picture

u should check the module inside i18n:SYNCHRONIZE TRANSLATIONS

hass’s picture

Status: Active » Fixed

How can you be sure that a comment in your code is not translatable? And who make the translator from doing a translation of something that is not translatable (code only)? Sounds like a theoretical discussion without realistic use case in reality. Otherwise the sync module seems to be a reasonable solution.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.