In the _name_field_widget_form:382 , it loops for all name translations but on line 389, it sets the title to its original value... Shouldn't it use the translated name translations ?

I will post the patch in the next comment.

- Etienne

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

emorency’s picture

Here is the patch to use the translated name component titles.

Alan D.’s picture

This line of code uses the field settings to add the label. I know that these are used in many sites where these fields are used for completely different purposes, for example one university site uses these fields to describe a course.

So the solution will not work, but this should stay open and a working solution needs to be found.

fraweg’s picture

Hello,

I need a solution for a multi language site too. In the registration form the titles like "Given" "Family" are not translatable..

Thanks for any help!

Best regards
Frank

Edit: This patch works for me. I will use it until there is no other solution.

drupal a11y’s picture

The Options set in the "Title component seettings" are totally ignored in my case (multidomain & multilanguage).

alexh’s picture

I know that t() should not be used to translate user input, but at least it works if it is used in line 389:

      $element['#components'][$key]['title'] = t(check_plain($fs['labels'][$key]));

This should probably be done using the i18_string module, but I could not find a way how.

stevieb’s picture

you could try using taxonomy - according to the field info
"Titles may be also imported from one or more vocabularies using the tag '[vocabulary:xxx]', where xxx is the vocabulary machine-name or id."

sgurlt’s picture

Version: 7.x-1.x-dev » 7.x-1.9
Issue summary: View changes

Anything new here?
I was able to find the title strings with i18n, but the translation of the title field does not get displayed?

PascalAnimateur’s picture

I can confirm the patch from #1 solves the problem with l10n (don't know about i18n though).

karimei’s picture

Here is my approach to solve this issue.

PascalAnimateur’s picture

Re-rolled patch from #9 to apply cleanly

webadpro’s picture

Patch #1 did it for me. I dont think #8 or #9 is the proper way to translate strings. Usually you dont pass variables to t() function. Thats what i18n string is for.

PascalAnimateur’s picture

Re-rolled patch #10 against 7.x-1.10 ... while we wait for proper i18n integration :(

DaReMe’s picture

Expanded patch #12 - added context for t() because the name of the title component conflicts with the drupal built-in title field.

Alan D.’s picture

Version: 7.x-1.9 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
2.13 KB

Re-roll.

Any rtbtc & she will be committed. It's the select list and titles. Both default and I18N versions should be checked.

Notes:
check_plain(t()) used as t() accepts unescaped characters.
t() with context "name:options:{$key}" added to options (autocomplete & select lists)

Liam Morland’s picture

Please put your patch into an issue fork.

natew’s picture