Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UHF-8909 District languages #904

Merged
merged 35 commits into from
Aug 30, 2024
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c58dbf4
Merge pull request #708 from City-of-Helsinki/dev
teroelonen Oct 11, 2023
f2cb87b
Merge pull request #716 from City-of-Helsinki/dev
khalima Oct 25, 2023
5553761
Merge pull request #721 from City-of-Helsinki/dev
rpnykanen Nov 8, 2023
e656152
Merge pull request #727 from City-of-Helsinki/dev
khalima Nov 21, 2023
a911dff
Merge pull request #733 from City-of-Helsinki/dev
khalima Nov 22, 2023
341ea7a
Merge pull request #736 from City-of-Helsinki/dev
khalima Nov 29, 2023
47bf3a1
Merge pull request #747 from City-of-Helsinki/dev
khalima Dec 5, 2023
d8544d9
Merge pull request #760 from City-of-Helsinki/dev
rpnykanen Dec 21, 2023
c486440
Merge pull request #772 from City-of-Helsinki/dev
khalima Jan 9, 2024
c5b8d81
Merge pull request #775 from City-of-Helsinki/dev
rpnykanen Jan 9, 2024
ddc0756
Merge pull request #778 from City-of-Helsinki/dev
khalima Jan 17, 2024
d3bca30
Merge pull request #783 from City-of-Helsinki/dev
khalima Jan 31, 2024
c9ea214
Merge pull request #793 from City-of-Helsinki/dev
teroelonen Feb 14, 2024
db27a26
Merge pull request #802 from City-of-Helsinki/dev
rpnykanen Feb 22, 2024
c4475e7
Merge pull request #807 from City-of-Helsinki/dev
rpnykanen Feb 28, 2024
033c2d5
Merge pull request #809 from City-of-Helsinki/dev
rpnykanen Feb 28, 2024
09a6f85
Merge pull request #817 from City-of-Helsinki/dev
rpnykanen Mar 14, 2024
945efef
Merge pull request #828 from City-of-Helsinki/dev
khalima Mar 27, 2024
ca37216
Merge pull request #843 from City-of-Helsinki/dev
khalima Mar 27, 2024
272023b
Merge pull request #845 from City-of-Helsinki/dev
rpnykanen Apr 10, 2024
3312d2b
Merge pull request #854 from City-of-Helsinki/dev
teroelonen Apr 11, 2024
0db4b72
Merge pull request #856 from City-of-Helsinki/dev
rpnykanen Apr 24, 2024
aded5d6
Merge pull request #871 from City-of-Helsinki/dev
rpnykanen May 8, 2024
5c58641
Merge pull request #877 from City-of-Helsinki/dev
rpnykanen May 22, 2024
81188e3
Merge pull request #882 from City-of-Helsinki/dev
rpnykanen Jun 5, 2024
0b0d9c0
Merge pull request #886 from City-of-Helsinki/dev
rpnykanen Jun 5, 2024
e5ebe08
Merge pull request #890 from City-of-Helsinki/dev
hyrsky Jun 19, 2024
38f1cbf
Merge pull request #895 from City-of-Helsinki/dev
hyrsky Jun 19, 2024
e136944
UHF-8909: Use language manager to get current language.
khalima Jul 29, 2024
4011d69
Merge pull request #898 from City-of-Helsinki/dev
hyrsky Aug 14, 2024
46a002c
Merge pull request #907 from City-of-Helsinki/dev
hyrsky Aug 15, 2024
93ebb77
Merge pull request #909 from City-of-Helsinki/dev
teroelonen Aug 15, 2024
215f021
Merge pull request #911 from City-of-Helsinki/dev
hyrsky Aug 16, 2024
e4cc73f
UHF-8909: Merge branch 'dev' of github.com:City-of-Helsinki/drupal-he…
teroelonen Aug 16, 2024
10cd4c0
UHF-8909: Merge branch 'main' of github.com:City-of-Helsinki/drupal-h…
teroelonen Aug 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ function hdbt_subtheme_preprocess_node(array &$variables) {
continue;
}
$district_title = $district_node->getTitle();

if ($district_node->hasTranslation($variables['current_langcode'])) {
$district_title = $district_node->getTranslation($variables['current_langcode'])->getTitle();
$language = \Drupal::languageManager()
->getCurrentLanguage(LanguageInterface::TYPE_CONTENT);
if ($district_node->hasTranslation($language->getId())) {
$district_title = $district_node->getTranslation($language->getId())->getTitle();
}

$district_titles[] = $district_title;
Expand Down