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

tomsm’s picture

Sorry, this site did not respond correctly and I accidentally posted this issue 3 times.

killua99’s picture

I need to know if translate suffix is posible. Thanks :)

udane’s picture

I also need to translate suffix. Any solution, please? Thanks.

tomsm’s picture

Workaround: 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:

if (isset($node->field_price[0]['value']))
{$node_field[0]['value'] = t("incl. VAT");};

With CSS I positioned the computed behind the CCK field:

.field-field-price {
	float: left;
	padding-right: 7px;
}

UPDATE
I have noticed that sometimes the wrong translation is shown. This is a caching issue.
So I changed my computed field:

if ($node->language == "en")
{$node_field[0]['value'] = "incl. VAT";}

if ($node->language == "fr")
{$node_field[0]['value'] = "TTC";}

if ($node->language == "nl")
{$node_field[0]['value'] = "incl. BTW";}
;
killua99’s picture

@tomsm: You did that with hook_form_alter? or hook_form_FORM_ID_alter? to focus my question, where did you put that code?.

tomsm’s picture

I put that code in my computed field. Computed field is a cck module:
http://drupal.org/project/computed_field

killua99’s picture

oh, sorry, didn't pay attention to the name module.

Thanks for the advice ;D

joseph.olstad’s picture

Issue summary: View changes
Status: Active » Closed (outdated)