It's not possible to translate the prefix/suffix for fields with "Price with Prefix / Suffix" format. Maybe I missed something, but I looked in the translate interface page but it wasn't there. I also tried to translate the field with field_translation but since prefix and suffix are display parameter they don't appear.

Patch following

Comments

idflood’s picture

StatusFileSize
new1.45 KB

Here is a first patch, it simply use the t() function.

idflood’s picture

Status: Active » Needs review
ikos’s picture

Hi,

Thanks for reporting.

I initially didn't think this patch was necessary as you can set your own text for prefix and suffix.
However on reflection I can see that for a multilingual site you'd want to have different values.

Testing the patch now.

kind regards

Richard

ikos’s picture

StatusFileSize
new1.59 KB

OK I couldn't get the patch to work so I changed the approach a little - please test this one and see if it works.

joerch’s picture

Hi!

I would like to test the patch but I have only basic skills in programming and I never used git.

Is there an other possibility to get a updated module file?

//joerch

cosmin-hm’s picture

Hi,

After applying the v2 patch it renders as:

<span class="price_prefix"><p>From</p></span>

... as seen at http://euphone.hodis.ro/ro/product-category/smartphones

-----

joerch, check http://www.lightrains.com/blog/apply-patches-drupal-modules-files, it's the easiest way to apply patches that I found.

cosmin-hm’s picture

Well, I'm not a coder so I can't pinpoint this, but when I switched from "plain text" to "PHP code" in the field display management, the p tag disappeared.

I'm still no sure where I should translate the prefix, because refreshing the strings brought nothing new in Translate.

akalam’s picture

New patch to translate "From" prefix

dxx’s picture

StatusFileSize
new14.84 KB

Patch from #8 working good but allow the translation with HTML into field, I'm not sure whether this is a desired operation?

hunlaprovo’s picture