feat: add Russian localization and independent STT languages
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { resolveLanguage, type Language } from "../core/i18n.ts";
|
||||
import { stores } from "./stores.ts";
|
||||
/** Explicit app preference wins; automatic follow-ups retain the foreground browser's language. */
|
||||
export function applicationLanguage(system?: string | null): Language {
|
||||
return resolveLanguage(stores.settingsStore.readSettings()?.general?.language, system ?? process.env.LH_SYSTEM_LANGUAGE ?? Intl.DateTimeFormat().resolvedOptions().locale);
|
||||
}
|
||||
export function chatLanguage(chatId: string): Language {
|
||||
return applicationLanguage(stores.chatStore.getChat(chatId)?.language);
|
||||
}
|
||||
Reference in New Issue
Block a user