Fixed display of default source and target language, updated README for installation instructions

This commit is contained in:
pascalyazid committed 2026-03-12 07:58:44 +00:00
1 parent f90ec06a4f
commit 2753b07b09
6 files changed
+132 -12

No files matched your search

+6 -1
View File
@@ -29,8 +29,12 @@ function detectBrowserLanguage(): string {
}
const detectedLang = detectBrowserLanguage();
const defaultSource = detectedLang;
const defaultTarget = detectedLang === "en" ? "es" : "en";
var defaultTarget = "en"
if(detectedLang == "en") {
defaultTarget = "es";
}
export function useTranslation(options: UseTranslationOptions = {}) {
const sourceText = ref("");
@@ -96,6 +100,7 @@ export function useTranslation(options: UseTranslationOptions = {}) {
options: {
onChunk?: (chunk: string) => void;
onComplete?: (fullText: string) => void;
model?: Ref<string>;
} = {},
) {
if (!isReadyToTranslate.value) {