Hi, in the views I can get a filter for language, but often (most times) I would like the view to get the language as an argument, for example when I make panels I would like to have the same view in both the English, Norwegian, and other languages. As it is now I have to make a new view for every language.

CommentFileSizeAuthor
#1 i18nviews_5x.2.4_argument.patch1.71 KBg10

Comments

g10’s picture

Version: 5.x-2.2 » 5.x-2.4
Component: Module i18nviews » Code
Status: Active » Needs review
StatusFileSize
new1.71 KB

same here…

the filter 'Internationalization: Selection' works for html front-ends, but when you call a view thru the Services module it does not take in account the current selection, at this point an argument is the only option… (if you do not want to duplicate dozens of views for each language every time)

therefore this patch, it adds an 'Internationalization: Language' to the arguments, and with the [lang] token provided as argument is shows the proper nodes

nedjo’s picture

Status: Needs review » Needs work

Since language filtering is in Views for 6.x, likely this patch should be made first on Views HEAD and then backported if appropriate to i18n 5.x.

bartezz’s picture

Hi g10,

I'm not a 100% sure, is this is a solution to what I've described here: http://drupal.org/node/413282?

Cheers

g10’s picture

Hi Bartezz, (sorry for late reply)

this patch add's an option to the arguments, it can be used easely for your issue: make 1 view with the 'Internationalization: Language' argument, and for the cck viewfield do a force default and [lang] as argument… this way you don't need to duplicate a certain view for each language

bartezz’s picture

Hi g10,

Thanx for the reply! Will look into it but have solved it by cloning views for now.

Cheers

jose reyero’s picture

Status: Needs work » Closed (won't fix)

No new features for 5.x. Only critical bug fixes.