@localazy/strapi-plugin
Version:
The official Strapi Plugin by Localazy.
20 lines (19 loc) • 1.02 kB
TypeScript
import type { Core, UID, Modules } from '@strapi/strapi';
import type { Locale } from '../models/strapi/locale';
declare const StrapiI18nService: ({ strapi }: {
strapi: Core.Strapi;
}) => {
getLocales(): Promise<Locale[]>;
getDefaultLocaleCode(): Promise<string>;
createStrapiLocale(isoLocalazy: string): Promise<Locale>;
parseLocalazyKey(key: string): {
uid: string;
id: string;
rest: string[];
};
getEntryInLocale(modelUid: UID.ContentType, documentId: Modules.Documents.AnyDocument['documentId'], isoStrapi: string): Promise<Modules.Documents.AnyDocument | null>;
createLocalizationForAnExistingEntry(uid: UID.ContentType, baseEntry: any, newEntry: any): Promise<Modules.Documents.AnyDocument>;
updateLocalizationForAnExistingEntry(uid: any, localizedDocumentId: any, data: any, locale: string): Promise<Modules.Documents.AnyDocument>;
};
export type StrapiI18nServiceReturnType = ReturnType<typeof StrapiI18nService>;
export default StrapiI18nService;