Skip to content

Commit c58b181

Browse files
authored
Merge pull request #23 from RRZE-Webteam/FAU-452
[FAU-452] Introduce 'linkWithLang' method
2 parents 9d164cf + 9f48a51 commit c58b181

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Application/DegreeProgramViewTranslated.php

+11-1
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,17 @@ public function modified(): string
464464

465465
public function link(): string
466466
{
467-
return $this->link;
467+
return is_locale_switched() ? $this->linkWithLang() : $this->link;
468+
}
469+
470+
protected function linkWithLang(): string
471+
{
472+
return add_query_arg(
473+
[
474+
'lang' => $this->lang,
475+
],
476+
$this->link
477+
);
468478
}
469479

470480
public function slug(): string

0 commit comments

Comments
 (0)