import { InjectionToken } from '@angular/core'; /** 支援的語系列表 */ export declare const SUPPORT_LANGS: readonly ["zh-TW", "zh-CN", "en-US", "ja-JP", "ko-KR", "vi-VN", "th-TH", "id-ID"]; /** 支援的語系 */ export type SupportLang = typeof SUPPORT_LANGS[number]; /** 語系顯示名稱 */ export declare const SUPPORT_LANG_NAMES: Record; /** 預設語系 zh-TW */ export declare const DEFAULT_LANG: SupportLang; /** I18N 配置介面 */ export interface I18nConfig { /** 預設語系 */ defaultLang: SupportLang; /** 多語系來源 Url */ hostUrl: string; /** 多語系來源版本 */ langVersion: string; /** 是否為APP */ isApp: boolean; /** 呼叫多語系api時是正式或開發環境 */ isI18nProdApi: boolean; } /** * I18N 配置注入 * * 用於在應用程式中提供多語系配置。可在模組或元件中透過 `provide` 覆寫預設配置。 * * @example * // 在 app.config.ts 或模組中提供自訂配置 * import { I18N_CONFIG } from '@uofx/core'; * * export const appConfig: ApplicationConfig = { * providers: [ * { * provide: I18N_CONFIG, * useValue: { * defaultLang: 'zh-TW', * hostUrl: 'https://api.example.com/i18n', * langVersion: 'v1.0.0', * isApp: false, * isI18nProdApi: true * } * } * ] * }; * * @example * // 在服務中注入並使用配置 * import { inject } from '@angular/core'; * import { I18N_CONFIG } from '@uofx/core'; * * export class MyService { * private config = inject(I18N_CONFIG); * * constructor() { * console.log('預設語系:', this.config.defaultLang); * console.log('API 網址:', this.config.hostUrl); * } * } * * @example * // 使用 factory 提供動態配置 * { * provide: I18N_CONFIG, * useFactory: () => { * const isProd = environment.production; * return { * defaultLang: 'zh-TW', * hostUrl: isProd ? 'https://prod.api.com' : 'https://dev.api.com', * langVersion: '1.0.0', * isApp: false, * isI18nProdApi: isProd * }; * } * } */ export declare const I18N_CONFIG: InjectionToken;