Taxonomy menu - translation of terms - drupal-7

I have website with 2 languages and 2 different categories. I would like to use taxonomy menu on both languages, but I want just to translate these terms to my language and use taxonomy as menu.
When editing taxonomy I have 3 options to pick:
Localize.
Terms are common for all languages, but their name and description may be localized.
It seems that this is solution I'm looking for: I want to have translated terms ad just add nodes and pick category. But this is not working.
Translate.
Different terms will be allowed for each language and they can be translated.
This does not work too.
Fixed Language.
Terms will have a global language and they will only show up for pages in that language.
I don't want to have 2 different terms, I want to have one term translated, so this solution is not for me.
When I say that it's not working I mean, that on when other language is selected, whole page is translated into this language, but not taxonomy menu. I remember that I wrote my own block for displaying it, but then I had to add translated path to each term.
Is there a possibility in drupal to have:
Menu based on taxonomy (for example: taxonomy has terms: Bikes and Cars)?
Translated terms and displayed in menu depend on current site language (for en: Bikes/Cars, for french: Vélo/Auto)?
Translated paths for taxonomy terms (Bikes => bikes, Cars => cars, Vélo => velo, Auto => auto)?
How to manage this?

If I understand your question, localize term is the choice you shoud use but remember to refresh your translation interface on admin/build/translate/refresh after changing taxonomy translation setting.
For menu based on taxonomy, you could use TaxonomyMenu and for localized menu address, i18nmenu is a good choice.

It will work only in 7.x-2.x version with re-introduction of the Add item for Vocabulary option.
https://drupal.org/node/1034310
But check this one also:
https://drupal.org/node/1665308

This is quite an old question, but for people with the same problem as in question (2):
Taxonomies linked to a content type won't show the translation by default (even if you have translated the taxonomy) To show the localized version, you have to change the display options.
Go to structure > content types > (content type)
Click on 'manage display'. There, you have the option to change the format, eg. link -> link (localized)

Related

Why don't drupal 7 allow the taxonomy's term fields?

For content types, I am able to translate the content's fields in drupal, but for the taxonomies term's fields, its only allow to translate the title and body fields.I added two more fields in taxonomy's term. Please guide me.
You need to change the vocabulary setting a bit and then you will be able to do it.
You need to select the option "Translate. Different terms will be allowed for each language and they can be translated." (highlighted in above image) and then it will allow you to use a different term in each language with the translated terms field values. We are using this and its working fine. Though, other settings won't allow you to achieve what are you trying to do.
Hope that help!

Structured Data JSON-LD for Localbussiness with multiple locations query

I'm new to JSON-LD. I find the syntax fairly straightforward but my query lies more with deciding which pages it is best to add the JSON-LD to. I've spent a bit of time looking for an answer online but so far nothing has been clear.
My example:
The site is for a business that has roughly 20 branch locations across the country. Each office has a dedicated contact details page, and there is also a "contact us" page for the site as a whole.
Should I
A: Add 'Organisation' JSON-LD snippet for the organisation as a whole to the homepage of the site, and then add individual 'LocalBusiness' JSON-LD snippets to each office details page?
B: Consolidate all this into one snippet of JSON-LD that has 'Organisation' with nested 'LocalBusiness'es and place it on ALL office pages, with a separate 'Organisation' snippet for the homepage?
C: Consolidate all this into one snippet of JSON-LD that has 'Organisation' with nested 'LocalBusiness'es and place it on ALL pages sitewide?
D: None of the above... Instead you should ____________________.
I realise there may not be one correct answer for this, but any help at all in achieving what would be considered best practice, would be greatly appreciated!
Cheers
Per the JSON-LD specification, it’s totally up to the authors. Consumers of your JSON-LD might of course have their own expectations.
You seem to use the vocabulary Schema.org, which is sponsored by the big Web search engine services. They are of course typically interested in your page content. The general idea of Schema.org is to mark up your existing content (+ closely related metadata).
This becomes clear when looking at the other syntaxes supported by Schema.org (Microdata and RDFa), as they define attributes that get added to existing HTML elements used for your content. So JSON-LD is the exception here, as it doesn’t get coupled with the HTML/content.
tl;dr: On a page about a branch location, provide structured data about this branch location.
It typically makes sense to provide structured data about related entities (e.g., the parent organization) in addition. This can be done by including the data and/or by referencing it via its URI (see an example). Make use of the properties the type offers (e.g., parentOrganization).
If this question is still relevant to someone, here is my recommendation:
on the homepage, create a "LocalBusiness" markup and use the "department" attribute for each branch.
So in your case, there should be one main office and 19 departments.
For the main office, indicate all attributes (opening hours, logo, image, etc.) For branches, mark up only distinct properties, such as address or telephone (they are apparently different for each branch).
For example, if all branches have the same working hours, no need to repeat them again and again - indicate working hours only for the main office.
Then on each dedicated contact details page add "LocalBusiness" markup only for that specific branch - without departments. You can indicate all attributes in detail.
Do not add "LocalBusieness" sitewide - Schema markup must be relevant to a specific page.
Also, here is an article that can help to understand it better:
https://postelniak.com/blog/local-business-schema-for-multiple-locations/
There you can also find JSON-LD code snippets.

Drupal 7 : bind two or more taxonomies

I'm using drupal 7 to make a kind of humanities collaborative portal.
Let's say I have 3 taxonomies : authors, concepts, dissertation and the corresponding content-types.
I would like to bind the terms in these taxonomies together.
If I write a dissertation, I would like to be able to choose at least one couple of author-concept as though it was one new tag.
For example, I wrote a dissertation about "What is the self ?", and used Husserl's cogito on one hand and Hume's self on the other hand.
I'm coding my own search engine to fetch these couples so that if I search "Hume cogito" my dissertation won't be in the results.
My problem is that I don't know how to bind taxonomies in that way nor linking those taxonomies when the user creates a content.
I thought about hierachical taxonomy but it doesn't seem to make sense.
Any idea welcome !
In our Project we were using a similar functionality for glossary search.
There are 2 methods one is
Create a content-type for Items.
1)Any term can be mapped to multiple other terms by creating two fields of term reference and making the second field with add many(1 term -may terms relationship) .
2)There was a module in drupal 6 called "Term Relations" which i believe has dev version for drupal 7

Show list of users based on taxonomy term (D7)

I have a taxonomy vocabulary "Department". In the user account I have a taxonomy term reference field with this vocabulary. So each user can be assigned to one or more departments.
I used the module Taxonomy Meny to show the taxonomy terms in my main menu.
Now I want to show a list of users when I click on a department in the menu.
Does anybody have an idea how I could do this?
Thanks.
Note sure here, but I suppose you should be able to use the views module to achieve this. Use can show all user nodes (or a list by choosing fields) and enter the department as a contextual filter.
Uou can use views in 2 ways, to produce pages or blocks. Contextual filters are a bit easier with pages, but that might confilt with yout module.
I like this tutorial, it gives a clear insight in contextual filters. It should get you started.
http://www.metaltoad.com/blog/using-drupal-contextual-filters-views

Drupal 7 views filter by node's taxonomy term

I have a similar question to my previous one (Drupal 7 views filter by dynamic taxonomy term), it's only the other way round.
I have a "partner" content type, each with it's own taxonomy term. The other content type is a regular page with multiple terms from the "partner" vocabulary. In my regular nodes, I want to include a few of the "partners" in a view block.
The view should filter only those relevant partner nodes (those tagged with one of the regular node's tags).
Could it be done this way? The problem is that I can't get the term names from URL via contextual filters...
After googling the whole afternoon (and posting it there), I eventually found the answer.
It's based on a tutorial on scito.ch (thanks), with only a few modifications. On the Content: Has taxonomy term ID (with depth) filter, be sure to check the Allow multiple values checkbox. Also (there's a lot of wrong tuts for that), don't specify anything in the WHEN THE FILTER VALUE IS AVAILABLE OR A DEFAULT IS PROVIDED. It's important you specify all those 3 contextual filters.
Hope this helps someone and saves him a sunny afternoon :)

Resources