Compatibility with WPML – @language is shown
-
Hi,
Using WPML, when taxonomies are spelled exactly the same in 2 languages (i.e. “Documents”), WPML appends @language to the taxonomy name.
As example:
English: Documents
French : Documents @fr (@fr is added automatically by WPML)>> Breadcrumbs NavXT returns “Documents @fr” in the displayed path.
Questions/Comments:
- Is there a fix for that?
- I’ve managed to “patch” Breadcrumb NavXT file to fix the issue. I would like to see this (or another) fix implemented in a future version.
Here’s the patch i’ve added:
I’ve simply replaced
$term->name
bystr_replace('@'.ICL_LANGUAGE_CODE, '', $term->name)
./breadcrumb_navxt/class.bcn_breadcrumb_trail.php (line: 450)
$breadcrumb = $this->add(new bcn_breadcrumb($term->name, $this->opt['H' . $term->taxonomy . '_template_no_anchor'], array('archive', 'taxonomy', $term->taxonomy, 'current-item'), NULL, $term->term_id));
by:
$breadcrumb = $this->add(new bcn_breadcrumb(str_replace('@'.ICL_LANGUAGE_CODE, '', $term->name), $this->opt['H' . $term->taxonomy . '_template_no_anchor'], array('archive', 'taxonomy', $term->taxonomy, 'current-item'), NULL, $term->term_id));
Thanks for your input.
- The topic ‘Compatibility with WPML – @language is shown’ is closed to new replies.