feat: add basic language switch to settings

This commit is contained in:
Nybkox
2025-02-20 15:15:40 +01:00
parent b7044248cb
commit 93a1c593fe

View File

@@ -39,6 +39,8 @@
import { derived } from 'svelte/store';
import { safeFormatDate } from 'dbgate-tools';
import FormDefaultActionField from './FormDefaultActionField.svelte';
import { _t } from '../translations';
import { internalRedirectTo } from '../clientAuth';
const electron = getElectron();
let restartWarning = false;
@@ -122,6 +124,21 @@ ORDER BY
{/if}
<FormCheckboxField name="tabGroup.showServerName" label="Show server name alongside database name in title of the tab group" defaultValue={false} />
<div class="heading">{_t('settings.localization', { defaultMessage: 'Localization' })}</div>
<FormSelectField
label="Language"
name="localization.language"
isNative
options={[
{ value: 'en-US', label: 'English' },
{ value: 'cs-CZ', label: 'Czech' },
]}
on:change={() => {
setTimeout(() => {
internalRedirectTo('/');
}, 100);
}}
/>
<div class="heading">Data grid</div>
<FormTextField