Skip to main content
The cart is empty

This tags translation documentation has 3 parts

  1. module populars tags
  2. tags link translation
  3. custom menu link

1) Module Populars Tag

Falang dosen't support the query of the Tags Popular modules due to the Max in the query but this query can be changed to be compaptile with Falang

modules\mod_tags_popular\src\Helper\TagsPopularHelper.php

Line 49 

from

$query = $db->getQuery(true)
            ->select(
                [
                    'MAX(' . $db->quoteName('tag_id') . ') AS ' . $db->quoteName('tag_id'),
                    'COUNT(*) AS ' . $db->quoteName('count'),
                    'MAX(' . $db->quoteName('t.title') . ') AS ' . $db->quoteName('title'),
                    'MAX(' . $db->quoteName('t.access') . ') AS ' . $db->quoteName('access'),
                    'MAX(' . $db->quoteName('t.alias') . ') AS ' . $db->quoteName('alias'),
                    'MAX(' . $db->quoteName('t.params') . ') AS ' . $db->quoteName('params'),
                    'MAX(' . $db->quoteName('t.language') . ') AS ' . $db->quoteName('language'),
                ]
            )

to

 ->select(
                [
                    'MAX(' . $db->quoteName('tag_id') . ') AS ' . $db->quoteName('tag_id'),
                    'COUNT(*) AS ' . $db->quoteName('count'),
                    'MAX(' . $db->quoteName('t.title') . ') AS ' . $db->quoteName('title'),
                    'MAX(' . $db->quoteName('t.access') . ') AS ' . $db->quoteName('access'),
                    'MAX(' . $db->quoteName('t.alias') . ') AS ' . $db->quoteName('alias'),
                    'MAX(' . $db->quoteName('t.params') . ') AS ' . $db->quoteName('params'),
                    'MAX(' . $db->quoteName('t.language') . ') AS ' . $db->quoteName('language'),
                    't.id as tag_id',//sbou
                    't.title as title'//sbou
                ]
            )

After this change the Tags are translated Correctly

The original Language English

The translated language French

2 - Tags link translation

When you click on the "Santé" link in the tag cloud or an article tag. You are redirected to 

[Site]/index.php/fr/component/tags/tag/health

or in french

[Site]/index.php/fr/component/fr/tags/tag/health

 You can see on the Image bellow the Title is not translated in french 

To allow title translation you have to download and publish an extra plugins Falang - Content Tag (only available on Falang paid version) - See My Download section.

After That you can see the Content Title transalted for the Health (Santé) Tag.

 3 - Custom menu link

Actually on Joomla 5 / Falang 5.2 the alias of the menu item don't have to be translated or it make a 404

On Joomla to have  you own custom menu link for system meny type , you have to make a menu item, this menu item is not displayed and often put in a Hidden menu.

For tags link , you have to create a Tags - List All Tags. if you put my-tags for the alias the menu will become

[Site]index.php/en/my-tags/health for english

 

I can translate this menu item in french to "Mes Tags" with "mes-tags" for Alias "mes tags" 

The url will be

/index.php/fr/mes-tags/health