mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 06:49:37 +02:00
fix: put languages in locale selection dropdown into native language
This commit is contained in:
parent
eea87e59a5
commit
73036dcef8
10 changed files with 23 additions and 101 deletions
|
@ -13,6 +13,18 @@
|
|||
import { t, locale, locales } from 'svelte-i18n';
|
||||
import { themes } from '$lib';
|
||||
|
||||
let languages: { [key: string]: string } = {
|
||||
en: 'English',
|
||||
de: 'Deutsch',
|
||||
es: 'Español',
|
||||
fr: 'Français',
|
||||
it: 'Italiano',
|
||||
nl: 'Nederlands',
|
||||
sv: 'Svenska',
|
||||
zh: '中文',
|
||||
pl: 'Polski'
|
||||
};
|
||||
|
||||
let query: string = '';
|
||||
|
||||
let isAboutModalOpen: boolean = false;
|
||||
|
@ -236,8 +248,8 @@
|
|||
on:change={submitLocaleChange}
|
||||
bind:value={$locale}
|
||||
>
|
||||
{#each $locales as loc}
|
||||
<option value={loc} class="text-base-content">{$t(`languages.${loc}`)}</option>
|
||||
{#each $locales as loc (loc)}
|
||||
<option value={loc} class="text-base-content">{languages[loc]}</option>
|
||||
{/each}
|
||||
</select>
|
||||
<input type="hidden" name="locale" value={$locale} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue