4

I have created a custom field in a view and I want to translate it but Drupal prevents me from doing show.

This is the error: enter image description here

How can I resolve this problem?

  • 1
    You should only be translating strings, not html. – Alex Gill Jan 24 '13 at 13:38
8

By default, Filtered HTML and Full HTML are not available for translation. You can override this by enabling the i18n module and visiting:

  • /admin/config/regional/i18n/strings (on Drupal 7)
  • admin/settings/language/configure/strings (on Drupal 6)

Just check the boxes for the text formats which you wish to enable.

Depending on your situation, you may also need to enable the i18n Views module.

6

Patrick answer is good. In some cases though you might run into the same error even with Full HTML available for translation. In this case you may have to turn down validation (this has security implications so do not use if untrusted people have access to the translation interface (I strongly recomand not to give access to the translation interface to untrusted people ;) )).*

Anyway to turn down translation validation create a custom module with this fonction :

  function YOURMODULE_form_i18n_string_locale_translate_edit_form_alter(&$form, $form_state) {
    unset($form['#validate']);
    // could also replace default validation handler function
    // (locale_translate_edit_form_validate) with a modified version.
  }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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