Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a decimal CCK field (price) with a suffix.
The suffix in English is "VAT incl.".
In French this should be "TVAC" and in Dutch "BTW incl.".
I am able to translate the label of the CCK field, but I cannot find the suffix string.
Is it possible to translate the suffix?
Comments
Comment #1
tomsm CreditAttribution: tomsm commentedSorry, this site did not respond correctly and I accidentally posted this issue 3 times.
Comment #2
killua99 CreditAttribution: killua99 commentedI need to know if translate suffix is posible. Thanks :)
Comment #3
udane CreditAttribution: udane commentedI also need to translate suffix. Any solution, please? Thanks.
Comment #4
tomsm CreditAttribution: tomsm commentedWorkaround: I used a computed field and CSS to simulate a suffix.
I have a decimal CCK field called price. I wanted to add "incl. VAT" as suffix that should be translatable.
When the field is empty, the computed field is not shown.
This is the php code of the computed field:
With CSS I positioned the computed behind the CCK field:
UPDATE
I have noticed that sometimes the wrong translation is shown. This is a caching issue.
So I changed my computed field:
Comment #5
killua99 CreditAttribution: killua99 commented@tomsm: You did that with hook_form_alter? or hook_form_FORM_ID_alter? to focus my question, where did you put that code?.
Comment #6
tomsm CreditAttribution: tomsm commentedI put that code in my computed field. Computed field is a cck module:
http://drupal.org/project/computed_field
Comment #7
killua99 CreditAttribution: killua99 commentedoh, sorry, didn't pay attention to the name module.
Thanks for the advice ;D
Comment #8
joseph.olstad