Translatable pre-defined field values in CCK

magoo - April 21, 2008 - 07:54
Project:#translatable
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

From the description of the module:

"
Translatable provides support for most used Drupal core objects, i.e. nodes,
blocks, menu items, and taxonomy vocabularies and terms. Due to its design,
support for CCK-based nodes is built-in.
"

However, I am not able to find the way to translate a select list with predefined options.

An example:
Content-type defining a person has a select list for choosing Mr or Mrs.
How can I translate Mr and Mrs to other languages?
The Localization - manage strings does not provide me a way to do it.

I tried to define key|value pairs in the values section instead of only the key but without success.

Is there a way to do this with this module?

thanks in advance

#1

sun - April 21, 2008 - 08:03
Version:5.x-1.0» 5.x-1.x-dev
Category:support request» feature request

uhm, no. CCK support currently refers to creating translations of CCK nodes. Support for translating pre-defined CCK field values (like in your example) is currently not available. Patches are welcome, though.

#2

magoo - April 21, 2008 - 09:29

I don't think I am able to provide a patch, I believe the patch should concern the CCK module providing the select list, or is it a translatable issue

All I can do is to provide my workaround of the issue:

-> define the possible values in the php section, like this:

return array(
  'mr' => t('Mr'),
  'mrs' => t('Mrs')
);

Mr and Mrs are then available for translation.

But I am not able to find how to translate the 'title' and 'body' custom label name (?).

#3

magoo - April 23, 2008 - 13:13
Title:CCK built-in translation (?)» CCK built-in translation - images

To continue around the support of CCK by this great module:

I have added an image CCK field in a content-type. When translating a node, the image field is emptied.
If I try to upload another image I get an fopen error in my logs and the image is not displayed in the edit form.

And if I save the node, the original image is displayed in both languages.
EDIT: no, I loose the original image in the translation display.

Is there a limitation to 1 image in all translations for a given node?

#4

sun - April 25, 2008 - 17:15
Title:CCK built-in translation - images» Translatable pre-defined field values in CCK
 
 

Drupal is a registered trademark of Dries Buytaert.