1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-23 01:27:14 +02:00

Adding URL base to language selector. #548

This commit is contained in:
Patrik J. Braun 2022-12-09 22:29:15 +01:00
parent 9b56331f50
commit a4cdbc9b1c
2 changed files with 6 additions and 5 deletions

View File

@ -14,6 +14,6 @@
</button>
<div *dropdownMenu class="dropdown-menu" aria-labelledby="language">
<a *ngFor="let lang of languages" class="dropdown-item" href="/{{lang}}">{{lang}}</a>
<a *ngFor="let lang of languages" class="dropdown-item" href="{{urlBase}}/{{lang}}">{{lang}}</a>
</div>
</div>

View File

@ -1,7 +1,7 @@
import { Component, Input } from '@angular/core';
import { Config } from '../../../../common/config/public/Config';
import { CookieNames } from '../../../../common/CookieNames';
import { CookieService } from 'ngx-cookie-service';
import {Component, Input} from '@angular/core';
import {Config} from '../../../../common/config/public/Config';
import {CookieNames} from '../../../../common/CookieNames';
import {CookieService} from 'ngx-cookie-service';
@Component({
selector: 'app-language',
@ -12,6 +12,7 @@ export class LanguageComponent {
@Input() isDark: boolean;
languages: string[] = [];
current: string = null;
urlBase = Config.Client.urlBase;
constructor(private cookieService: CookieService) {
this.languages = Config.Client.languages.sort();