By Patrice Baril on Friday, 22 September 2017
Posted in Technical Issues
Replies 4
Likes 0
Views 795
Votes 0
We wrote our own language switcher and it works well in normal Joomla articles, and menu items as I can figure out using Joomla's API what a given menu or article the associated item is in a given language.

But I'm not sure how to use Joomla's API to get the associated EasyBlog post URL to a another Easyblog post in a given language.

Do you have some example PHP and jQuery code I could use for that, now that EasyBlog posts support associations ?
Hey Patrice,

Hm, not entirely sure why are you writing your own language switcher when Joomla already has it's own language switcher eh? By the way, EasyBlog uses the same API for Joomla which tries to call the file /components/com_easyblog/helpers/association.php .

In this file, EasyBlog will let Joomla know of the associated post with the URL. Is this what you are looking for?
·
Friday, 22 September 2017 14:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Why we built our language switcher is a bit of a complicated story, but related to older Joomla version and the need to switch country, as well as language, using GeoIP. I see now that there's a plugin that seems to do that, and more, but that what we had to work with. Also, it works ok in general.

But the good news is that yes, as described above, I was looking to use Joomla's API to handle associations. I wasn't sure if Easyblog was integrated with it, or if it used it's own association system.
·
Monday, 25 September 2017 04:03
·
0 Likes
·
0 Votes
·
0 Comments
·
I believe you do not need to add any extra code to make this blog associations work in Easyblog, since you did mentioned you did use your own code to built your own language switcher, so I am not really sure whether this will affect this or not.

But as long as you did setup correctly with your Joomla multilingue configuration on your site e.g.
1. Enable language plugin filter
2. setup different language menu item
3. associated with other language menu item with the same menu type
4. Display language switcher module on the site

Then Easyblog post association will work correctly, you can refer on my attached screenshot and this following video link :
http://take.ms/5bXLMM
·
Monday, 25 September 2017 07:16
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post