版博士V2.0程序
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

16 satır
888 B

  1. import type { MaybeRef } from '@vueuse/core';
  2. import type { InjectionKey, Ref } from 'vue';
  3. import type { Language } from 'element-plus/es/locale';
  4. export declare type TranslatorOption = Record<string, string | number>;
  5. export declare type Translator = (path: string, option?: TranslatorOption) => string;
  6. export declare type LocaleContext = {
  7. locale: Ref<Language>;
  8. lang: Ref<string>;
  9. t: Translator;
  10. };
  11. export declare const buildTranslator: (locale: MaybeRef<Language>) => Translator;
  12. export declare const translate: (path: string, option: undefined | TranslatorOption, locale: Language) => string;
  13. export declare const buildLocaleContext: (locale: MaybeRef<Language>) => LocaleContext;
  14. export declare const localeContextKey: InjectionKey<Ref<Language | undefined>>;
  15. export declare const useLocale: (localeOverrides?: Ref<Language | undefined> | undefined) => LocaleContext;