@yamlresume/ai
    Preparing search index...

    Function translateResume

    • Translate a YAMLResume from one locale language to another using an LLM.

      The translated text is parsed and validated against the YAMLResume schema. If validation fails, the request is retried up to maxRetries times.

      Parameters

      • sourceYaml: string

        The source resume YAML to translate.

      • fromLanguage:
            | "en"
            | "zh-hans"
            | "zh-hant-hk"
            | "zh-hant-tw"
            | "es"
            | "fr"
            | "no"
            | "nl"
            | "ja"
            | "de"
            | "id"
            | "pt-br"

        The source locale language.

      • toLanguage:
            | "en"
            | "zh-hans"
            | "zh-hant-hk"
            | "zh-hant-tw"
            | "es"
            | "fr"
            | "no"
            | "nl"
            | "ja"
            | "de"
            | "id"
            | "pt-br"

        The target locale language.

      • options: TranslateResumeOptions

        Translation options.

      Returns Promise<string>

      A raw YAML string representing the translated resume.

      When translation or validation ultimately fails.