@brendonovich/kobalte__solidbase
Version:
Fully featured, fully customisable static site generation for SolidStart
20 lines (19 loc) • 908 B
TypeScript
import type { LocaleConfig } from "../config/index.js";
export declare const DEFAULT_LANG_CODE = "en-US";
export declare const DEFAULT_LANG_LABEL = "English";
export interface ResolvedLocale<ThemeConfig> {
code: string;
isRoot?: boolean;
config: LocaleConfig<ThemeConfig>;
}
declare const LocaleContextProvider: import("@solid-primitives/context").ContextProvider<import("@solid-primitives/context").ContextProviderProps>;
export { LocaleContextProvider };
export declare function useLocale(): {
locales: ResolvedLocale<any>[];
currentLocale: import("solid-js").Accessor<ResolvedLocale<any>>;
setLocale: (locale: ResolvedLocale<any>) => void;
applyPathPrefix: (_path: string) => `/${string}`;
routePath: () => string;
};
export declare const getLocaleLink: (locale: ResolvedLocale<any>) => `/${string}`;
export declare function getLocale(_path?: string): ResolvedLocale<any>;