Keyword

Multi languages tags translation

  • Klaus Veliu
  • Klaus Veliu's Avatar Topic Author
  • Offline
  • Senior Member
More
3 weeks 5 days ago #172657 by Klaus Veliu
Klaus Veliu created the topic: Multi languages tags translation
Hello,

In a recent website that I am working on the client has very strict requirements regarding SEO in a multi-language website.

For the first time, I found myself in a very specific request, when the user switches the website language when viewing a tag page the browser should be redirected to the corresponding tag page of the new language

Example,
Current URL(English): example.com/en/tags/help
The user switches the language to Spanish
New URL: example.com/es/tags/ayuda

Unfortunately, I was not able to find an extension that gives the ability to translate the K2 tags and also it seems that the database table of _k2_tags lacks the structure to manage this feature.

As I am using Joomla just to manage the content of the website an extension that offers the users to translate the tags in administrator area would do the job.

Thank you!

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 weeks 4 days ago #172670 by Fotis
Fotis replied the topic: Multi languages tags translation
That's because K2 content assigned to different languages will likely have different tags as well. There are edge cases of course where different languages may require tags that are common in different languages. In that case, you can just filter the tag view with ?lang=XX.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Klaus Veliu
  • Klaus Veliu's Avatar Topic Author
  • Offline
  • Senior Member
More
3 weeks 4 days ago #172672 by Klaus Veliu
Klaus Veliu replied the topic: Multi languages tags translation
Yes, I admit it this was the first time after many years of work that I had this request.
The site now has 3 languages, maybe in the future, an extra more is going to be added.

As this feature is not even a "translation" I am going to alter the K2 tags table to assign the extra information to each tag. In this way at least I will be able to enable this feature in the website.

If there is an extension that gives the ability to add some extra information to a tag this would be a solution for my case, so if anyone has a suggestion please tell me.

Thank you!

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 weeks 4 days ago #172674 by Fotis
Fotis replied the topic: Multi languages tags translation
If you take a look at the relevant query here github.com/getk2/k2/blob/master/components/com_k2/models/itemlist.php#L86 you'll see the language is always passed before returning results. So even if the same tag is applied to 2 items of different languages, the tag listing page would always return the 1 with the correct language.

So you probably just need to make sure that ?lang=XX is appended on the auto-generated tag URLs.

No need for additional filtering.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

Moderators: william white

Powered by Kunena Forum