mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 22:21:27 -05:00
[PR #1313] [MERGED] feat: Configurable i18n default translation language #7429
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/1313
Author: @asedmammad
Created: 3/26/2024
Status: ✅ Merged
Merged: 3/28/2024
Merged by: @tjbck
Base:
dev← Head:feat/i18n-navigator-config📝 Commits (3)
26121c5wip: Set default language from config64e6003refac: Remove translation values for en-US0c021e4rename config key to default_locale📊 Changes
5 files changed (+370 additions, -360 deletions)
View changed files
📝
backend/data/config.json(+1 -0)📝
backend/main.py(+2 -4)📝
src/lib/i18n/index.ts(+30 -24)📝
src/lib/i18n/locales/en-US/translation.json(+331 -331)📝
src/routes/+layout.svelte(+6 -1)📄 Description
Pull Request Checklist
Description
This pull request introduces the ability for users to control i18n translation during deployment, resolving issue #1256. Previously, i18n only automatically detected the local language and applied corresponding translated content. With this change, users can now decide whether to enable this feature or set a default language during the deployment phase by setting
config.json.I was not sure about returning
default_localein/api/config, maybe @tjbck can help with comments on this.Changelog Entry
Added
default_localetoconfig.jsonand return it as backendConfig to the UI.Fixed
en-USas they are not necessary (keys are used as fallback).Changed
navigator's language otherwise.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.