Active
Project:
Internationalization Views
Version:
7.x-3.x-dev
Component:
Code
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Jan 2013 at 18:26 UTC
Updated:
7 Feb 2013 at 15:21 UTC
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
Comment #1
nicolas bouteille commentedSwitching to bug report as I think it is more appropriated.
Comment #2
nicolas bouteille commentedAny one ? Any advice where I should be looking ?
Comment #3
nicolas bouteille commentedI 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.
Comment #3.0
nicolas bouteille commentedPart of the problem was not real