Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/src/packages/next/locales/lib.ts
Views: 791
import type { I18nDictionary } from "next-translate";12import { unreachable } from "@cocalc/util/misc";3import type { Locale } from "./misc";45async function getIndexMessages(locale: Locale): Promise<I18nDictionary> {6switch (locale) {7case "en":8return (await import("locales/en/index.json")).default;9case "de":10return (await import("locales/de/index.json")).default;11case "es":12return (await import("locales/es/index.json")).default;13case "zh":14return (await import("locales/zh/index.json")).default;15case "ru":16return (await import("locales/ru/index.json")).default;17case "fr":18return (await import("locales/fr/index.json")).default;19case "it":20return (await import("locales/it/index.json")).default;21case "nl":22return (await import("locales/nl/index.json")).default;23case "ja":24return (await import("locales/ja/index.json")).default;25case "hi":26return (await import("locales/hi/index.json")).default;27case "pt":28return (await import("locales/pt/index.json")).default;29case "ko":30return (await import("locales/ko/index.json")).default;31case "pl":32return (await import("locales/pl/index.json")).default;33case "tr":34return (await import("locales/tr/index.json")).default;35case "he":36return (await import("locales/he/index.json")).default;37case "hu":38return (await import("locales/hu/index.json")).default;39case "ar":40return (await import("locales/ar/index.json")).default;41default:42unreachable(locale);43}44return {};45}4647export async function getI18nMessages(locale: Locale) {48return {49index: await getIndexMessages(locale),50};51}525354