Hi,

It seems that imagefield does not support i18n translations;

I would like to be able to translate texts that we can associate with imagefield (title, alt, description).

Could you add this feature please (some t() in scripts) ?

Thank you

Comments

quicksketch’s picture

ImageField should completely support translations when used with the translation.module (i18n module helps too). Translate the desired node, then update the alt and title text in the new translation. Technically speaking, wrapping t() around dynamic strings is very frowned upon, since there's no way to clean up those strings if the node were to be updated or deleted, permanently cluttering the database with strings that no longer are needed.

chipway’s picture

Status: Active » Closed (fixed)

Ok,

Thank you.

Your method seems better. May be i forgot soemthing.

I tried your way and it runs.

Thank you

Farreres’s picture

Just a quick note on this. ALT texts are properly internationalized when a new translation is created.

BUT

Default alt texts are not. There is only one default alt text, when there should be a different default alt text per language.

Can it be corrected? Or is there something I am missing?

gaele’s picture

Status: Closed (fixed) » Active

I stumbled upon this. Reopened because of #3.

LarsKramer’s picture

I want the images to be syncronized within a set of translated nodes, but still being able to put language specific ALT and title texts. At the moment, it seems this is not possible. Is it a bug, or is it meant to be so?

quicksketch’s picture

I want the images to be syncronized within a set of translated nodes, but still being able to put language specific ALT and title texts. At the moment, it seems this is not possible.

That's right, because there's no possible option in i18n for "Sync part of a field but not others". I'd suggest just disabling syncing if you need different ALT and Title tags. Either that or disable ALT and Title within the ImageField and add them as separate fields. Then use theming to put them all back together again.

LarsKramer’s picture

Ok, thanks for your quick reply. I'll have a look and see what works best.
Do you think the option to enable syncronization only for the image and not its text attributes could be facilitated by i18n? I might post a feature request in its issue queue about that.

UPDATE: there is a related issue here in i18n:
Image Title and Alt fields with Taxonomy i18n-term do not switch language

LarsKramer’s picture

Ok, I have been experimenting some more now: When I disable syncronization, ALT and TITLE texts can be translated differently, and it is not necessary to re-upload the image when adding a new translation, only if you as translator by accident removes the image. Of course, the disadvantage is that if you later change or add images, you would have to repeat it for all translations.

On the other hand, I find the Imagefield tokens module quite useful. It seems that with this module enabled you can have different tokens, and at the same time have the photos synchronized. What I did was to disable custom translation and put the [title] token as default ALT and TITLE texts. Not a perfect solution, but it works.

quicksketch’s picture

Category: feature » support
Status: Active » Closed (fixed)

For people using 3.7, you probably were getting bit by this bug: #749926: Imagefield title and alt field are reset after re-editing source node. The 3.8 version of ImageField and FileField should work properly with i18n again (with synchronization disabled). I'm closing this issue as translation has been possible for some time through i18n.