If I am using a entity reference for a taxonomy, and the taxonomy term has been translated, the options won't been translated.
While looking into the code, I think there is a missing t() for the $term->name.
Here is the patch, and it works fine in one our project. Hope it helps.
Here is the steps to reproduce this issue:
1: enable i18n_taxonomy module
2: create a taxonomy vocabulary, in the "MULTILINGUAL OPTIONS", select below option:
Localize. Terms are common for all languages, but their name and description may be localized.
3: create a entity reference field to the taxonomy created in step 2 for a content type.
4: create a term in step 2 and goto translated interface to translate it.
5: create a node in step 3, you will see the translated not word even you have already translated it.
After apply the patch, step 5 will show translated term name.
Comment | File | Size | Author |
---|---|---|---|
#2 | taxonomy_term_ref_label_translation_not_work-1.patch | 902 bytes | zterry95 |
taxonomy_term_ref_label_translation_not_word.patch | 1.04 KB | zterry95 | |
Comments
Comment #1
rogical CreditAttribution: rogical commentednice!
Comment #2
zterry95 CreditAttribution: zterry95 commentedThis is the correct patch.
Comment #3
zterry95 CreditAttribution: zterry95 commentedComment #5
letrotteur CreditAttribution: letrotteur commentedDon't think using t() is the right way to do it. Should be using some of the i18n function.
Comment #6
letrotteur CreditAttribution: letrotteur commentedSeems to be a duplicate issue of https://drupal.org/node/2013849
Comment #7
bradjones1