0

I have observed in Joomla (v3.9.16 and in older version too) a strange behavior (maybe it is right, but I don't understand it).

When we have fully installed and configured a multi-language site, if we try to create a new article, assign it to specific language and type also some tags for it, I have observed these 2 things:

  1. the tags created are not assigned to the right language but to all.
  2. the tags list display in the form of edit article, show all tags and not only the tags relative to the article language.

I have searched a lot on the internet, but I cannot find any solution or explanation.

Can someone help me to understand why, or simply suggest to me how can I manage these two situations?

1 Answer 1

0

In general Joomla seems to lean towards being unrestrictive, not just with tags but with other areas as well. Hence for example you can set a Spanish category against a French article. I think that once you start putting restrictions like that in place, users can come up with use cases for why that restriction is wrong.

Setting language = all is also a default for new items, such as articles or categories, although you could make an argument for setting the tag language to be the same as the item language.

You can set the Global Parameter of Tags / Item Selection / Language Filter to restrict the tags which are displayed on the front end, but I don't think this applies to the back end.

As regards managing the situation, something you could probably do is in the Tags field, in the available tags which are shown, add the language in brackets after the tag. This would make the field a little like the Category field, which puts the language in brackets after the category. Administrators can then easily see what language a tag relates to.

You'd have to override the tags field by doing something similar to what is suggested in How to conditionally filter the presentation of category when creating a new category/article?.

You'd need to put in place some process around setting the language of a tag whenever it's created.

More drastic measures could involve writing a plugin which fires on onContentBeforeSave and rejects inconsistent item / tag mappings.

1
  • Many many thanks Robbie...you are so clear, and thinking about it, maybe the unrestrictive general behavior in joomla it's a big great point...the solution you suggest for tags fields with brackets, is the exact solution I had choosen when observe the "incorerent for me" tags list, in edit form articles....another time, many thanks for good explanation. Apr 18, 2020 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.