My site is in English and Spanish.
My question pertains to the Similar by terms module and a custom view that on click shows random filtered by term nodes. How would I create an argument to show Spanish content when in Spanish mode, and English content when in English mode? I realize that I could simply filter nodes for Spanish.
How does the Similar by Terms module recognize the fact the page is in either English or Spanish, and display the appropriate language on click?
1 Answer
I think you should not think about language and let Drupal handle it.
If you install locale module and configure it correctly you will gain what you need:
- Install the Locale, Internationalization and Taxonomy translation modules. (The latter is optional.)
- When adding a taxonomy term, select "Multilingual options->Per language terms."
- When adding a content type, select "Workflow settings->Enabled."
- when adding content, select language.
-
I have taken the first steps and it works for the most part with similar by terms. However, with my custom view I've done the following:– GrahamJul 17, 2011 at 16:47
-
I filtered Node:published, and Node:terms (I have two specified terms: one for "surgery type" and one for "language" (it's a custom vocabulary for language so views could manually differentiate between english and spanish). My fields are Node:title. My sort criteria is: Globals:random. On the click of a button, this view generates a random -- filtered-- node. Now, if I were to filter Node:terms(spanish) as well(I only have english filtered at this point), could I add an argument to recognize: if the first arg. in the url is ES*, then it should render only ES* pages? Thank you.– GrahamJul 17, 2011 at 16:54
-
You go to wrong way from first, after enabling local module go to admin/settings/language/configure and select "Path prefix only" then completely delete your language taxonomy, and let drupal handle it by locale module. then add language filter in views Jul 17, 2011 at 17:33