From 6061fa9781205b4de2a5cc69a565036e5fb2bf97 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Fri, 16 Oct 2009 02:04:44 +0000 Subject: #565480 by plach and peximo: TF #2: Multilingual field handling. Integration between field API and locale module + translatable node bodies. --- modules/simpletest/tests/field_test.module | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modules/simpletest/tests/field_test.module') diff --git a/modules/simpletest/tests/field_test.module b/modules/simpletest/tests/field_test.module index d5c35d06b..8cc99b1e9 100644 --- a/modules/simpletest/tests/field_test.module +++ b/modules/simpletest/tests/field_test.module @@ -93,8 +93,13 @@ function field_test_entity_info() { * Implement hook_entity_info_alter(). */ function field_test_entity_info_alter(&$entity_info) { + // Enable/disable field_test as a translation handler. foreach (field_test_entity_info_translatable() as $obj_type => $translatable) { - $entity_info[$obj_type]['translation_handlers']['field_test'] = TRUE; + $entity_info[$obj_type]['translation']['field_test'] = $translatable; + } + // Disable locale as a translation handler. + foreach (field_info_fieldable_types() as $obj_type => $info) { + $entity_info[$obj_type]['translation']['locale'] = FALSE; } } @@ -646,7 +651,7 @@ function field_test_field_languages($obj_type, $field, &$languages) { */ function field_test_entity_info_translatable($obj_type = NULL, $translatable = NULL) { $stored_value = &drupal_static(__FUNCTION__, array()); - if (isset($obj_type) && isset($translatable)) { + if (isset($obj_type)) { $stored_value[$obj_type] = $translatable; _field_info_collate_types(TRUE); } -- cgit v1.2.3