import { InjectionToken } from '@angular/core'; import { Observable } from 'rxjs'; import { RhSafeAny } from 'rh-base/model'; import * as i0 from "@angular/core"; export interface RhI18NService { [key: string]: RhSafeAny; /** * Call `use` to trigger change notification * * 调用 `use` 触发变更通知 */ readonly change: Observable; /** * Get the default language * * 获取默认语言 */ readonly defaultLang: string; /** * Get current language * * 获取当前语言 */ readonly currentLang: string; /** * Change language * * 变更语言 * @param lang 语言代码 * @param emit 是否触发 `change`,默认:true */ use(lang: string, emit?: boolean): void; /** * Return to the current language list * * 返回当前语言列表 */ getLangs(): RhSafeAny[]; /** * 翻译 * - `params` 模板所需要的参数对象 * - `isSafe` 是否返回安全字符,自动调用 `bypassSecurityTrustHtml` */ fanyi(key: string, params?: { [key: string]: RhSafeAny; }, isSafe?: boolean): string; } export declare const RH_I18N_TOKEN: InjectionToken; export declare function RH_I18N_TOKEN_FACTORY(): RhI18NServiceFake; export declare class RhI18NServiceFake implements RhI18NService { private change$; get change(): Observable; get defaultLang(): string; get currentLang(): string; use(lang: string): void; getLangs(): RhSafeAny[]; fanyi(key: string): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }