Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

getSupportedLanguages

  • getSupportedLanguages(): Promise<AsyncResult<TranslationTypes.SupportLanguage[]>>
  • 获取翻译服务支持的语言。

    connection.getSupportedLanguages()
    

    Returns Promise<AsyncResult<TranslationTypes.SupportLanguage[]>>

translateMessage

  • translateMessage(params: { languages: string[]; text: string }): Promise<AsyncResult<TranslationTypes.TranslationResult>>
  • 翻译消息。

    connection.translateMessage('hello', 'zh')
    

    Parameters

    • params: { languages: string[]; text: string }
      • languages: string[]

        要翻译的目标语言代码列表。

      • text: string

        要翻译的文本。

    Returns Promise<AsyncResult<TranslationTypes.TranslationResult>>

Generated using TypeDoc