@@ -183,6 +183,13 @@ console.log(await deeplClient.translateText('How are you?', null, 'de', { formal
183183 ` sourceLang ` to be set, and cannot be combined with the singular ` glossary ` option.
184184- ` styleRule ` : specifies a style rule to use with translation, either as a string
185185 containing the style rule ID, or a ` StyleRuleInfo ` as returned by ` getAllStyleRules() ` .
186+ - ` styleProfile ` : specifies a style profile to use with translation, either as a
187+ string containing the style profile ID, or a ` StyleProfile ` as returned by
188+ ` getStyleProfile() ` . The profile applies its linked glossaries, style rule lists and
189+ translation memories; a component that does not fit the language pair is left out.
190+ Does not require ` sourceLang ` . Cannot be combined with ` glossary ` , ` glossaryIds ` ,
191+ ` styleRule ` , ` translationMemory ` , ` translationMemoryThreshold ` or
192+ ` customInstructions ` ; the API rejects such requests.
186193- ` translationMemory ` : specifies a translation memory to use with translation,
187194 either as a string containing the translation memory ID, or a
188195 ` TranslationMemoryInfo ` as returned by ` listTranslationMemories() ` .
@@ -286,6 +293,9 @@ directly:
286293- ` glossary ` : same as in [ Text translation options] ( #text-translation-options ) .
287294- ` glossaryIds ` : same as in [ Text translation options] ( #text-translation-options ) .
288295- ` styleRule ` : same as in [ Text translation options] ( #text-translation-options ) .
296+ - ` styleProfile ` : same as in [ Text translation options] ( #text-translation-options ) .
297+ A style profile that does not exist fails the translation with a
298+ ` DocumentTranslationError ` whose message contains ` Style profile not found. ` .
289299- ` translationMemory ` : same as in [ Text translation options] ( #text-translation-options ) .
290300- ` translationMemoryThreshold ` : same as in [ Text translation options] ( #text-translation-options ) .
291301- ` filename ` : if the input file is not provided as file path, this option is
@@ -704,6 +714,18 @@ console.log(updated.description); // undefined
704714await deeplClient .deleteStyleProfile (styleProfile);
705715```
706716
717+ To translate with a style profile, pass it as the ` styleProfile ` option of text or
718+ document translation:
719+
720+ ``` javascript
721+ const result = await deeplClient .translateText (' The artist is here.' , null , ' de' , {
722+ styleProfile: ' YOUR_STYLE_PROFILE_ID' ,
723+ });
724+ await deeplClient .translateDocument (' input.docx' , ' output.docx' , null , ' de' , {
725+ styleProfile: styleProfile,
726+ });
727+ ```
728+
707729### Translation Memories
708730
709731Translation memories store and reuse previously created translations, helping to
0 commit comments