3

When I create a new field type in Drupal it seems to be automatically assigned a 'translatable' property and it's not always right. For example, I would expect a Long Text field type to be marked as translatable = TRUE, but for some reason it's coming in as FALSE sometimes. However, body is TRUE.

Is there a place where this property is exposed in the UI and changeable?

I have the i18n module installed and enabled.

2 Answers 2

2

Entity translation exposes a checkbox which allows to set the translatable property.

It also provides a user interface to actually use field translation, there isn't much you can do with translatable fields without that module anyway.

0

Try the following code:

function mymodule_field_available_languages_alter(&$languages, $context) {
  $languages = array();
}

The hook is documented in Multilingual Field API, and hook_field_available_languages_alter().

somehow i18n does not respect that ..

1
  • A bit late, but i18n is not supposed to respect this. I18n doesn't care about field level translatability, it translates complete nodes. What it provides as an alternative is i18n_sync, which allows to keep certain fields in sync between node translations.
    – Berdir
    Jun 11, 2012 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.