Hi,

I'm using entity translation and title modules for translation. I don't want to create multiple terms for each language.
Having common term for each language, How to show the common tag on all languages and show its translated name if it exists otherwise show its default language name.

CommentFileSizeAuthor
#2 tagcloud_common_tag_translation.patch2.77 KBKamlendra

Comments

Kamlendra created an issue. See original summary.

Kamlendra’s picture

StatusFileSize
new2.77 KB

I've create a patch to solve this issue.
Patch is for version 7.x-1.10

This patch creates a radio button at tagcloud settings page at /admin/config/content/tagclouds
choosing

"No Separation Of Tags Per Language, Common Tag To All Languages Is Show As Per Its Translation. (Choose This If You Have Single Taxonomy Term For All Languages I.E. Localize Option Selected At Admin/Structure/Taxonomy/Vocabulary_name/Edit And Their Translation Is Added Using Entity Translation Module And Title Module. Make Sure You Have Taxonomy Term's Name Field Machine Name As Name_field That Is Autocreated By Title Module.)"

option will show the translated name of tags when you are using common terms for each language. With taxonomy terms translatable using entity translation and title module.

joseph.olstad’s picture

Thanks for the patch, some documentation will be required for this patch, looks like field name configuration must match what is in the patch or else a likely error. Great first iteration of a patch to get us going. TODO: make this user friendly. If the field name is not configured we need to gracefully warn the user to what we expect and tell the user where to get full documentation for this type of operation.

Kamlendra’s picture

Hi Joseph,

To test common tags for all language using tagclouds module with patch at #2
I've created the following Step By Step Guide to have common tags for all languages in each node:

1. enable entity translation if it isn't already.
2. enable title module if it isn't already.
3. install and enable tagclouds.
4. Enable translation for taxonomy terms, goto admin/config/regional/entity_translation in TRANSLATABLE ENTITY TYPES select Taxonomy terms.
5. Uncheck Hide language selector for your taxonomy vocabulary at admin/config/regional/entity_translation.
6. edit taxonomy vocabulary and choose translation mode "Localize" (Terms Are Common For All Languages, But Their Name And Description May Be Localized). (if you've enable i18n_taxonomy module enabled).
7. goto admin/structure/taxonomy/tags/fields, click replace link then check "Replace description with a field instance
If this is enabled the description will be replaced with a customizable field that can be translated." This will enable
translation of name field and its machine name will be "name_field".
8. add taxonomy term reference field to basic page content type.
8.1. (options: use any dropdown or autocomplete widget).
8.2. Do not enable translation on taxonomy term reference field as you want the same term for all languages.
9. enable "No Separation Of Tags Per Language, Common Tag To All Languages Is Show As Per Its Translation. "
in admin/config/content/tagclouds (This option will only be available after you've applied patch#2 successfully).
10. Now create test taxonomy term 1 at admin/structure/taxonomy/tags/add click save and translate and add its translation
add some more terms with their translations.
11. Use the newly created terms in basic page content.
12. You will have tags block with name tags in tags at admin/structure/block display this block at your desired region.
13. This block will show the common tags in English or their available translation in any other language.

joseph.olstad’s picture

Great work Kamlendra, sorry I haven't been able to review it yet in full , IMHO it would be nice to have this in the next release.

chris matthews’s picture

Version: 7.x-1.10 » 7.x-1.x-dev
Assigned: Kamlendra » Unassigned
Status: Active » Needs work
Issue tags: -tags, -tagcloud, -entity translation, -Localize +Needs reroll

The patch in #2 does not apply to the latest 7.x-1.x development branch, added needs reroll issue tag.

Checking patch tagclouds.module...
error: while searching for:
          '#title' => t('Separation of Tags per language'),
          '#options' => array('0'=>t('Disable separation by language'),
                              '1'=>t('Separation of Tags per language for site configured to use node translation (Choose this if you have one language per node , but no entity/field translations for the node fields and your taxonomy/vocabulary is not entity translation enabled)'),
                              'entity'=>t('Separation of Tags per language per entity. (Choose this if your content type/bundle is configured to use field translation aka entity translation and your tagcloudable taxonomy/vocabulary is translation enabled each term has a translation)')
                              ),
          '#default_value' => variable_get('tagclouds_language_separation_radios', '0'),
          '#description' => t('*Choose tagclouds language separation method.'),

error: patch failed: tagclouds.module:123
error: tagclouds.module: patch does not apply
grask0’s picture

Status: Needs work » Closed (outdated)

D7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.

If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.

Thanks!

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.