Syndicate content

translation

Jan 20
1

Translating Drupal CCK field values

Tue, 2009-01-20 15:19 — budda

In order for a string to get translated it must be passed through the t() function in PHP code.

When defining the CCK field you need to generate the 'Allowed values' list via PHP code. The box for PHP code is just beneath the normal box. Use code similar to:

return array(
  'male' => t('Male'),
  'female' => t('Female')
);