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.
Hard to believe i haven't come across this before but seems pretty obviously busted.
I have a view with a field: Taxonomy term: Name (translated)
In the view preview the term shows in the correct language. But when i use views_get_view_result() it only displays the term in the default language.
I'll see if i can see where the bug is occurring.
Comments
Comment #1
liquidcms CreditAttribution: liquidcms commentedhmm.. so the views preview runs through the i18nviews_handler_field_taxonomy_term_name handler (as it seems like it should); but views_get_view_result() does not. perhaps this is a bug on Views?
Comment #2
jojonaloha CreditAttribution: jojonaloha commentedI was working on updating a view to show results translated in the current language. An overview of my setup:
I had added the "Taxonomy term: Name (translated)" field, and the terms did not appear to be translated in the preview or when viewing the block. I also saw two "Taxonomy term: Name" fields, and added both, one appears to be the original term name, the other is the new name_field. When I add the checkbox with
value= "field_data_name_field.name_field"
, term names seem to be translated properly.