mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 06:49:37 +02:00
Add language selection and share localization for multiple languages
This commit is contained in:
parent
9ac4a8f4e9
commit
9c6e11b16d
10 changed files with 266 additions and 29 deletions
|
@ -252,15 +252,20 @@
|
|||
<button formaction="/?/setTheme&theme=aqua"
|
||||
>{$t('navbar.themes.aqua')}<Water class="w-6 h-6" /></button
|
||||
>
|
||||
<form method="POST" use:enhance>
|
||||
<select class="select" on:change={submitLocaleChange} bind:value={$locale}>
|
||||
{#each $locales as loc}
|
||||
<option value={loc}>{loc}</option>
|
||||
{/each}
|
||||
</select>
|
||||
<input type="hidden" name="locale" value={$locale} />
|
||||
</form>
|
||||
</li>
|
||||
<p class="font-bold m-4 text-lg text-center">{$t('navbar.language_selection')}</p>
|
||||
<form method="POST" use:enhance>
|
||||
<select
|
||||
class="select select-bordered w-full max-w-xs bg-base-100 text-base-content"
|
||||
on:change={submitLocaleChange}
|
||||
bind:value={$locale}
|
||||
>
|
||||
{#each $locales as loc}
|
||||
<option value={loc} class="text-base-content">{$t(`languages.${loc}`)}</option>
|
||||
{/each}
|
||||
</select>
|
||||
<input type="hidden" name="locale" value={$locale} />
|
||||
</form>
|
||||
</form>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue