1
0
mirror of https://github.com/NginxProxyManager/nginx-proxy-manager.git synced 2025-11-14 11:42:26 +03:00
Files
nginx-proxy-manager/frontend/src/locale/src/HelpDoc/index.ts
Frank e2a8ffa2d3 Add files via upload
Add German
2025-11-03 14:18:08 +01:00

28 lines
694 B
TypeScript

// import * as de from "./de/index";
// import * as fa from "./fa/index";
import * as en from "./en/index";
import * as de from "./de/index";
const items: any = { en, de };
const fallbackLang = "en";
export const getHelpFile = (lang: string, section: string): string => {
if (
typeof items[lang] !== "undefined" &&
typeof items[lang][section] !== "undefined"
) {
return items[lang][section].default;
}
// Fallback to English
if (
typeof items[fallbackLang] !== "undefined" &&
typeof items[fallbackLang][section] !== "undefined"
) {
return items[fallbackLang][section].default;
}
throw new Error(`Cannot load help doc for ${lang}-${section}`);
};
export default items;