views:

410

answers:

2

I need to open view with particular path as front page. Everything would be nice except the view must be open in another language than default (english).

Tryinig to prefix language in Site information settings or adding path alias with that prefix fails as Drupal says "tha path xxx is invalid" 'cause Drupal prefixes language automatically.

I've come up to thought to hack the core function or override front page method with custom code.

Is there any solution by means of configuration?

Precision: I need INTERFACE language (menus etc.) to be changed, not only the view content.

A: 

Can't you add a filter to the view specifing the language you want it to use? (View -> Filters -> Node Language -> Is one of ...)

Vinicius Pinto
Thanks for reply! See, I need INTERFACE language (menus etc.) to be opened in another language, not only the view content itself.
Norman
A: 

If you just want to change the language, you can do that by changing the global $language in a preprocess function for that view.

You can use language_list() to get an array of active languages and overwrite the global $language with one from the list. You need to do this in a preprocess function, look at the theme information in your view to get more info about it.

googletorp
Could you please advise where and how to apply this change?
Norman
Preprocess is in template.php in your theme folder. I would look there and implement the tips googletorp has suggested.
Chris Ridenour

related questions