I wonder if there is any way of localizing name of link when you create link with Static Title. Like for example using name "t(link title)".

Im running web with products where I have links to manual, firmware etc. Links are simply named "Manual" and "Firmware", etc... So I dont want to add them manualy, eventually I could make some typo or accidentaly name they different or something. I think this be made by allowing php in field Static Title or something like that. Do someone know how to do that? I'm also opened for other ideas how to do that :-)

CommentFileSizeAuthor
#2 i18n_widget_link_title.diff312 bytesJacobSingh

Comments

JacobSingh’s picture

I have the same issue. I'm going to look into it a bit.

JacobSingh’s picture

Status: Active » Needs review
StatusFileSize
new312 bytes

This patch should do it. Don't know if it should be committed though.

svihel’s picture

Now when you told me how, it doesnt seems to be that hard :)
Anyway working well, thank you.

Should be included into regular module, imo.

sun’s picture

Title: Link - localazation » Link title localization
Version: 5.x-2.0 » 5.x-2.1
Component: User interface » Code
Assigned: svihel » Unassigned
Category: support » feature
Status: Needs review » Needs work

t() is the wrong function here. It is not intended for localizing user input.

JGO’s picture

Please fix this, I have the same problem :(

----------------------------
JGO | http://www.e2s.be
----------------------------

JGO’s picture

Since nobody came up with a solution, I think this is a proper fix:

inside: link.module , function _link_sanitize(&$item, $delta, &$field, &$node)

  // Use the title defined at the field level.
  if ($field['title'] == 'value' && strlen(trim($field['title_value']))){
    // Support for translatable static titles with i18nstrings.module.
    if (module_exists('i18nstrings'))
      $title = tt('nodetype:type:' . $field['field_name'] . '-' .$delta .':title_value', $field['title_value'], NULL, TRUE);
    else 
	  $title = $field['title_value'];
  }

Since it depends on the content module, the string could probably be saved along with other content module strings (nodetype:type)

----------------------------
JGO | http://www.e2s.be
----------------------------

JGO’s picture

This fix in #6 was not proper, on refreshing of strings the translations disappear.
Isn't there anyone worried about this ? :s BTW the problem is of course also in version 6.* which I'm using

JGO’s picture

BUMP!

dqd’s picture

Status: Needs work » Closed (won't fix)

The stop for Drupal 5 support

Since we have to catch up to get ready for the final Drupal 7 release and have to deal with many feature requests for the Drupal 6 and Drupal 7 version of the link field module, we sadly have to annouce the stop of Drupal 5 support. The files will stay for any individual use or customization, but any support in the issue queue and in the forums has expired from now on.

Sorry and thanks for understanding.