2025-01-24 06:25:37 -08:00

16 lines
468 B
TypeScript

import _LANG_FLAGS from "@/langs-flags-list/lang-flags.json"
import _LANGUAGES from "@/assets/languages.min.json"
export const LANG_FLAGS = _LANG_FLAGS
export function longLang(shortLang : string) {
return ((LANG_FLAGS as any)[shortLang] as any)["nameEnglish"] as string
}
export function lang_a3_a2(a3 : string) {
return _LANGUAGES.find(l => l.alpha3 === a3);
}
export function lang_a2_a3(a2 : string) {
return _LANGUAGES.find(l => l.alpha2 === a2);
}