I use this module in my multilanguage website, and I can't translate my Fivestar Rating field label, I fix that problem via changing the line 287 at /includes/fivestar.field.inc file, I just add t() function and it works, please add this as update in feature. Also I am attaching the patch file of my changes.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | fivestar-translate_field_label_and_description.patch | 2.75 KB | k-l |
| fivestar.field_.inc_.patch | 769 bytes | sargismarkosyan |
Comments
Comment #1
moehac commentedIt works for me as well, even though might not be proper way. Possible issues with entity translations all together. Thanks for the patch.
Comment #2
ericduran commentedIs this the correct way?
I feel like it isn't. I'll need to check.
Comment #3
k-l commentedAttaching a bit better patch.
When field was translated using field translation, then simple t() doesn't get translated string, therefore i18n_field_translate_property() is used to get translated label and description.
Comment #4
eigentor commentedI can confirm the patch from #3 solves the problem. Cannot set RTBC though, as I am not a coder.
Comment #5
swentel commentedI can confirm the patch works fine too, but I'm hesitating as well for RTBC.
i18n_field already does some workarounds for other modules, because some modules structure their widgets differently. Fivestar is also one of them. So the question is whether we need to fix it here or in i18n_field.
However, as a temporary quick fix, this certainly does the trick.
Comment #6
whiteph commentedThanks everyone. This patch looks good to me. It's in the latest 7.x-2.x-dev version.