🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
import { appLocales, matchLocaleTag } from '@lobehub/edge-contract/request-locale';
import { DEFAULT_LANG } from '@/const/locale';
import type resources from './default';
export const locales = appLocales;
export type DefaultResources = typeof resources;
export type NS = keyof DefaultResources;
export type Locales = (typeof locales)[number];
export const matchLocale = (locale?: string): Locales | undefined =>
matchLocaleTag(locale, locales);
export const normalizeLocale = (locale?: string): Locales => matchLocale(locale) ?? DEFAULT_LANG;
type LocaleOptions = {
label: string;
value: Locales;
}[];
export const localeOptions: LocaleOptions = [
{
label: 'English',
value: 'en-US',
},
{
label: '简体中文',
value: 'zh-CN',
},
{
label: '繁體中文',
value: 'zh-TW',
},
{
label: '日本語',
value: 'ja-JP',
},
{
label: '한국어',
value: 'ko-KR',
},
{
label: 'Deutsch',
value: 'de-DE',
},
{
label: 'Español',
value: 'es-ES',
},
{
label: 'العربية',
value: 'ar',
},
{
label: 'Français',
value: 'fr-FR',
},
{
label: 'Português',
value: 'pt-BR',
},
{
label: 'Русский',
value: 'ru-RU',
},
{
label: 'Türkçe',
value: 'tr-TR',
},
{
label: 'Polski',
value: 'pl-PL',
},
{
label: 'Nederlands',
value: 'nl-NL',
},
{
label: 'Italiano',
value: 'it-IT',
},
{
label: 'Tiếng Việt',
value: 'vi-VN',
},
{
label: 'Български',
value: 'bg-BG',
},
{
label: 'فارسی',
value: 'fa-IR',
},
] as LocaleOptions;
export const supportLocales: string[] = [...locales, 'en', 'zh'];