We are using (and enhancing) a bilingual (multilingual) distro of Drupal mainly used Canadian federal, provincial and municipal governments that takes great care and attention to internationalization capabilities and came accross this module.
Discovered this on 7.x and noticed it's the same problem in 8.x
When entity translation is enabled (each node/entity can have one to many field translations for 1 to many languages) Tagclouds displays terms of other languages in block even if separation by language is selected
Patch to follow for both 8.x dev and 7.x dev
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | terms_of_other_languages_displayed_in_block_even_if-tagclouds_language_separation_enabled-2285791-1.patch | 2.04 KB | joseph.olstad |
Comments
Comment #1
joseph.olstadNeed to check in code if using entity_translation (not node translation) add appropriate condition. Otherwise it won't work in entity_translation mode
Comment #2
joseph.olstadComment #3
joseph.olstadComment #4
joseph.olstadSee attached patch (has not yet been tested but should work)
Comment #5
joseph.olstadTo test this patch:
(options: use autocomplete widget)
(more options: enable translation on taxonomy term reference field)
Now, this patch works great most of the time. There are some edge cases though. It just so happens that some words are the same accross different languages. For instance the word "corruption" is the same in English as it is in French, for these cases the condition in the query should not be using taxonomy_index table it should be using the field_data_field_xyz field_xyz_tid.language instead of td.language in the join. However this will require some UI work and some more stuff on the other end. The attached patch is far better than what the current implementation is (for entity_translation) but a more graceful solution should be attempted in a new issue, I'll create a new issue for that and reference this one.
Comment #6
joseph.olstadComment #7
joseph.olstadEnhancement for the above patch: a radios button for language separation settings was added to the 7.x parent issue (see D7 commits for how it was done). Look into something like this for D8 branch. Note that entity_translation is now part of D8 core.
Comment #8
joseph.olstad