@ogs-gmbh/ngx-translate
Version:
A lightweight, REST-based Angular i18n library designed for seamless internationalization with minimal setup. It supports dynamic language switching & flexible translation management via RESTful APIs.
31 lines (30 loc) • 2.5 kB
TypeScript
import { HttpRequestStatus, HttpOptions, HttpHeadersOption } from "@ogs-gmbh/ngx-http";
import { Observable } from "rxjs";
import { LocaleConfig } from "../types/config.type";
import { HttpClient } from "@angular/common/http";
import { TranslationHttpSerivce } from "./translation-http.serivce";
import { TranslationStoreService } from "./translation-store.service";
import * as i0 from "@angular/core";
export declare class TranslationService {
private readonly _httpClient;
private readonly _translationConfig;
private readonly _translationStoreService;
private readonly _translationHttpService;
private readonly _isHttpLoading;
private readonly _isHttpLoading$;
isHttpLoading$(): Observable<HttpRequestStatus | null>;
_preloadWithRef$(httpClient: Readonly<HttpClient>, translationStoreService: Readonly<TranslationStoreService>, translationHttpService: Readonly<TranslationHttpSerivce>, _locale: LocaleConfig, scopeName: ReadonlyArray<string | null> | string | null, httpOptions?: HttpOptions<never, HttpHeadersOption, never>): Observable<void>;
translateTokenByLocale$(token: string, value: string, scopeName?: ReadonlyArray<string | null> | string | null, httpOptions?: HttpOptions<never, HttpHeadersOption, never>): Observable<string>;
translateTokenByCurrentLocale$(token: string, value: string, scopeName?: ReadonlyArray<string | null> | string | null, httpOptions?: HttpOptions<never, HttpHeadersOption, never>): Observable<string>;
preloadByLocale(httpClient: Readonly<HttpClient>, translationStoreService: Readonly<TranslationStoreService>, translationHttpService: Readonly<TranslationHttpSerivce>, scopeName: string | null | ReadonlyArray<string | null>, httpOptions?: HttpOptions<never, HttpHeadersOption, never>): Observable<void>;
preloadByCurrentLocale(httpClient: Readonly<HttpClient>, translationStoreService: Readonly<TranslationStoreService>, translationHttpService: Readonly<TranslationHttpSerivce>, scopeName: string | null | ReadonlyArray<string | null>, httpOptions?: HttpOptions<never, HttpHeadersOption, never>): Observable<void>;
private _resolveScope;
private _translateBySourceLocale;
private _translateByStore;
private _getScopedFileByNotifier;
private _getScopedFileByAddingNotifier;
private _getScopedFileByHttpWithRef$;
private _translateWithRef$;
static ɵfac: i0.ɵɵFactoryDeclaration<TranslationService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<TranslationService>;
}