Watermark works only with English language. When you make use of the Locale module and switch to another language (e.g. German) it wont work.
Because $size['label'] (on code line 141) holds the translated string and not the array-key defined by image module.

Fix suggestion:

replace following code in watermark.module (line 140 to 152):

  foreach (_image_get_sizes() as $size) {
    $label_list[] = $size['label'];
  }
  $label_list[] = IMAGE_ORIGINAL;

  foreach ($label_list as $label) {
    $label_var = WATERMARK . $label;
    $form['watermark']['labels'][$label_var] = array(
      '#type' => 'checkbox',
      '#title' => $label,
      '#default_value' => variable_get($label_var, false),
    );
  }

with:

  foreach (_image_get_sizes() as $key => $size) {
    $label_list[$key] = $size['label'];
  }  

  foreach ($label_list as $key => $label) {
    $label_var = WATERMARK . $key;
    $form['watermark']['labels'][$label_var] = array(
      '#type' => 'checkbox',
      '#title' => $label,
      '#default_value' => variable_get($label_var, false),
    );
  }

Comments

schnizZzla’s picture

Title: Watermark does not work with other language than English (with fix suggestion) » Watermark language issue (with fix suggestion)

OK i understand. I created the last dev version of watermark to use it on a german website ;-) We also use the locale module, that's why I changed the title.

To have an overview of issues for the next version, please give me your drupal and image module version here.

jack13’s picture

sorry, I forgot

Drupal Version 5.3
Image Module Version 5.x-1.6
Image Watermark Version 5.x-1.x-dev