1

Is it possible to translate the suffix of an integer field? The prefix/suffix settings doesn't appear under the translate section for the field. And I tried searching for the string in "Translate interface" with no luck.

The field is being used in a view where all the fields are in a list, any alternative solutions are also welcome. Using Drupal 7.

4
  • 1
    are you using the t function? like in t('your prefix')
    – GwenM
    Jun 11 '15 at 16:06
  • I'm pretty new to Drupal. I thought the t() function was only used in templates. I can use it when I edit the fields via the interface as well? Jun 11 '15 at 20:34
  • not really sure what you mean, can you show a screenshot?
    – GwenM
    Jun 12 '15 at 8:12
  • Not sure that I can. I mean the problem is that there isn't an option to translate the suffix. I add the suffix through the web interface, the field is on a structure type, and when I go to edit the field, there's a input field of a suffix. But the suffix doesn't turn up in the translate option for the field nor in the general "Translate Interface". Jun 12 '15 at 11:03
2

I didn't find a solution to actually translate the suffix. Instead I added a rewrite of the field in the view where it was used, and rewrites show up in the translate settings in the view.

So the solution is, don't use a suffix. Instead add a rewrite option to the field where you use it, and translate that rewrite option instead.

1

For Drupal 7, patch #56 from https://www.drupal.org/node/1221208 allows the prefix and suffix to be translated through the regular translate interface.

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.