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

liquidcms’s picture

hmm.. 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?

jojonaloha’s picture

I was working on updating a view to show results translated in the current language. An overview of my setup:

  • Enabled modules: i18n_taxonomy, i18n_field, i18n_string, i18nviews, entity_translation
  • view of Taxonomy Terms, using block display
  • vocabulary multilingual options set to "Localize"
  • term name field was replaced with name_field

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.