Skip to content

Commit f377bf6

Browse files
committed
Make language toggle optional in settings (#40)
1 parent af86fc6 commit f377bf6

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/app/components/lang-switch/lang-switch.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="text-right">
1+
<div class="text-right" *ngIf="Settings.showLanguageToggle">
22
<button
33
(click)="translate.use('en')"
44
[ngClass]="[translate.currentLang === 'en' ? 'font-bold' : '']"
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
import { Component } from '@angular/core';
22
import { TranslateService } from '@ngx-translate/core';
3-
import { NgClass } from '@angular/common';
3+
import { NgClass, NgIf } from '@angular/common';
4+
import { Settings } from '../../config/settings';
45

56
@Component({
67
selector: 'app-lang-switch',
78
standalone: true,
8-
imports: [NgClass],
9+
imports: [NgClass, NgIf],
910
templateUrl: './lang-switch.component.html',
1011
styleUrl: './lang-switch.component.scss',
1112
})
1213
export class LangSwitchComponent {
1314
constructor(public translate: TranslateService) {}
15+
16+
protected readonly Settings = Settings;
1417
}

src/app/config/settings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ export const Settings = {
388388
viewer: {
389389
showReferenceStrip: true,
390390
},
391+
showLanguageToggle: false,
391392
labelMaxChars: 100,
392393
predicates: {
393394
parents: parentPredicates,

0 commit comments

Comments
 (0)