Skip to content

Commit

Permalink
Merge pull request #27 from wri/issue-327-translations2
Browse files Browse the repository at this point in the history
Issue 327 translations2
  • Loading branch information
mariacha authored Nov 29, 2021
2 parents 26549e2 + 1f759dc commit 803b6c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -99,7 +99,7 @@ function wri_taxonomy_term_uri(TermInterface $term) {
if (isset($filter_by)) {
$paths_helper = \Drupal::service('wri_search.pretty_facets_helper');
if ($paths_helper) {
return Url::fromUri('internal:/resources' . $paths_helper->getPrettyPaths($filter_by));
return Url::fromUri('internal:/resources' . $paths_helper->getPrettyPaths($filter_by), ['language' => $term->language()]);
}
}
}
Expand Down

0 comments on commit 803b6c8

Please sign in to comment.