Download & Extend

Results of views_get_view_result() are not translated by design. Is there a way to get translated raw data ?

Project:Internationalization Views
Version:7.x-3.x-dev
Component:Code
Category:support request
Priority:minor
Assigned:Unassigned
Status:active

Issue Summary

When retrieving results of a view using the function views_get_view_result(), filtering content's language to be the current user's language won't work + translatable fields won't be translated, they will always be displayed in the site's default language.

The current user's language should be added to the context of the function.
If I'm right this works correctly with the function views_embed_view()

Comments

#1

Category:feature request» bug report

Switching to bug report as I think it is more appropriated.

#2

Any one ? Any advice where I should be looking ?

#3

Title:Make the function views_get_view_result() language aware» Results of views_get_view_result() are not translated by design. Is there a way to get translated raw data ?
Category:bug report» support request
Priority:major» minor

I finally got my answer from an issue posted on Views : http://drupal.org/node/1901214
First I was wrong about the filtering by current user's language not working, it is actually working so the function views_get_view_result() is indeed current user's language aware. However, I learnt that this function is designed to bring back « raw » data and that « raw » data means « not translated » data.
I personally think it would be great to have a way to retrieve « translated raw data » from Views.
For now I shared on the post above the way I did it but I would be interested to know what you guys think about it, what could be done and what couldn't.

nobody click here