@j2inn/app
Version:
J2 Innovations core application framework
38 lines (37 loc) • 1.27 kB
TypeScript
import type { I18n } from '@j2inn/i18n';
import type { App } from './app/App';
/**
* Returns the app's name to use for i18n.
*
* @param app The app or app id.
* @returns The i18n key to use for getting the app view's name.
*/
export declare function getAppName(app: App | string): string;
/**
* Returns the app view's id.
*
* @param app The app or app id.
* @parama appViewKey The key to the application view.
* @returns The id for the app view.
*/
export declare function getAppViewId(app: App | string, appViewKey: string): string;
/**
* Returns the app view's name to use for i18n.
*
* @param app The app or app id.
* @param appView The app view for the app.
* @returns The i18n key to use for getting the app view's name.
*/
export declare function getAppViewName(app: App | string, appViewKey: string): string;
/**
* Return the translated app name.
*
* This method attempts to translate the app's name but if an entry
* can't be found then it falls back to trying to load the translated
* string from the `finUi` app.
*
* @param appName The app (or app view) name.
* @param i18n The internationalization object.
* @returns The translated string.
*/
export declare function getTranslatedAppName(appViewName: string, i18n: I18n): string;