Closed (fixed)
Project:
Internationalization
Version:
7.x-1.x-dev
Component:
Taxonomy
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Apr 2011 at 08:58 UTC
Updated:
8 Aug 2012 at 12:12 UTC
I'm trying to localize terms of a localizable vocabulary. However, i18n_taxonomy_localize_terms doesn't seem to localize them because i18n_taxonomy_vocabulary_mode returns a string whereas I18N_MODE_LOCALIZE is an integer.
They are equal (value is 1), but not identical (string versus integer), so it seems like the following comparison will always return false:
if (i18n_taxonomy_vocabulary_mode($term->vid) === I18N_MODE_LOCALIZE) {
To reproduce this issue, run following code (replace $vid with the vid of your localizable vocabulary):
$vid = 5;
$taxonomy_mode = i18n_taxonomy_vocabulary_mode($vid);
$localize_mode = I18N_MODE_LOCALIZE;
if(is_string($taxonomy_mode)) dpm('taxonomy mode = '.$taxonomy_mode. ' ('.gettype($taxonomy_mode).')');
if(is_int($localize_mode)) dpm('localizable mode = '.$localize_mode.' ('.gettype($localize_mode).')');
Comments
Comment #1
betz commentedyep, this is blocking.
Comment #2
jose reyero commentedReplaced by the right usage of taxonomy modes, which is
i18n_taxonomy_vocabulary_mode($term->vid, I18N_MODE_LOCALIZE)
It uses '&' operator, so it should work now. Check out latest -dev version.
Comment #4
clude commentedSame problem, but i have installed the 7.x-1.x-dev (2012-Aug-06).
Error:
Fatal error: Call to undefined function i18n_taxonomy_localize_terms() in /webseiten/sites/all/modules/advanced_forum/includes/core-overrides.inc on line
Or is that a Advanced Forum bug?
Comment #5
clude commentedOk it`s a Advanced Forum bug.