Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
import { useCallback } from "react";
import { useLocale } from "./locale-store";
import { translate } from "./messages";
import type { TranslationKey } from "./messages";
import type { InterpolationValues } from "./types";
export {
AUTO_LOCALE,
DEFAULT_LOCALE,
DEFAULT_LOCALE_PREFERENCE,
LOCALE_STORAGE_KEY,
LOCALE_INITIALIZATION_TIMEOUT_MS,
LOCALE_SELECTION_TIMEOUT_MS,
getLocale,
getLocaleCatalogFailed,
getLocalePreference,
getPendingLocalePreference,
initializeLocale,
isLocalePreference,
setLocale,
subscribeLocale,
useLocale,
useLocaleCatalogFailed,
useLocalePreference,
usePendingLocalePreference,
} from "./locale-store";
export type {
LocaleChangeResult,
LocalePreference,
SetLocaleOptions,
} from "./locale-store";
export {
LOCALES,
isSupportedLocale,
messages,
translate,
} from "./messages";
export type { Locale, TranslationKey } from "./messages";
export { formatRelativeTime } from "./relative-time";
export type {
DeepPartialMessageTree,
InterpolationValues,
MessageKey,
MessageTree,
} from "./types";
export function useT(): (
key: TranslationKey,
values?: InterpolationValues,
) => string {
const locale = useLocale();
return useCallback(
(key: TranslationKey, values?: InterpolationValues) =>
translate(key, values, locale),
[locale],
);
}