Skip to content

Commit

Permalink
Issue #327 adding translation to the url.
Browse files Browse the repository at this point in the history
  • Loading branch information
maria-thinkshout committed Nov 23, 2021
1 parent 26549e2 commit 537a479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/wri_taxonomy/wri_taxonomy.module
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function wri_taxonomy_entity_type_alter(array &$entity_types) {
*/
function wri_taxonomy_term_uri(TermInterface $term) {
if ($term->field_landing_page && $term->field_landing_page->isEmpty() === FALSE && isset($term->field_landing_page->entity)) {
return $term->field_landing_page->entity->toUrl();
return $term->field_landing_page->entity->toUrl('canonical', ['language' => $term->language()]);
}

if (!empty(\Drupal::hasService('wri_search.pretty_facets_helper'))) {
Expand Down

0 comments on commit 537a479

Please sign in to comment.