3

When I translate field labels via admin/config/regional/translate/translate then my changes are happening in the frontend - but this does not work for fields which I created myself. Those fields are available for translation in the same spot but changes to them have no effect - it always uses the original text.

In my case it's about some additional fields in the registration form. I have de/user/register and fr/user/register and the pre-existing fields are in the correct language and if I do changes to them, then they are applied. But if I provide translations for the fields which I added, then they just don't show up.

I am using Drupal 7.14. On the picture, you see the custom field "wohnort". The first one has been there right after the creation of the custom field; the second one only after the Field Translation module and the i18n pack.

screenshot

3

Here is Internationalization pack for building multilingual sites in Drupal: i18n.
To translate field labels you need “Field translation” module from this pack. After you enable it new tab “Translate” appears on field edit page.

enter image description here

Update

That's strange that you can see your field labels on admin/config/regional/translate/translate page, so I started an issue #1672694. I think it's a bug.

Update 2

Fixed since Drupal 7.22

  • Thank you very much kalabro. I already had i18n installed but it has so many modules and there is so much stuff around it that i just didn't get it. -- However I'm still quite interested why it didn't work without that module, I think that it should. Otherwise I don't see the reason why the system even gives me the option to save a translation for my custom fields. – noviolence Jul 5 '12 at 12:26
  • No, it shouldn't. It will work if you wrap your labels output with t() function but it's bad practice because t() is for static strings in your code. – kalabro Jul 5 '12 at 12:42
  • 2
    But i still don't quite get it - why can those strings be found in the translate module if it doesn't change a thing what i put in there. And I'm not coding the output, I didn't change a thing about the output I just added some fields to the registration form. – noviolence Jul 5 '12 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.