@@ -5,6 +5,8 @@ Use a single engine instance to translate strings, arrays, and chat logs, or
55to detect the locale of free-form text. The engine handles request batching,
66progress reporting, and surfacing validation or transport errors.
77
8+ Example (basic setup):
9+
810***
911
1012* Full name: ` \LingoDotDev\Sdk\LingoDotDevEngine `
@@ -45,7 +47,7 @@ When API key is missing or values fail validation
4547Localize every string in a nested array while keeping its shape intact.
4648
4749``` php
48- public localizeObject(array<string ,mixed > $obj, array<string ,mixed > $params, null| callable $progressCallback = null): array<string ,mixed >
50+ public localizeObject(array<string ,mixed > $obj, array<string ,mixed > $params, callable|null $progressCallback = null): array<string ,mixed >
4951```
5052
5153** Parameters:**
@@ -58,7 +60,7 @@ public localizeObject(array<string,mixed> $obj, array<string,mixed> $params, nul
5860- 'sourceLocale' (string\| null): Language code of original text, null for auto-detection
5961- 'fast' (bool): Trade translation quality for speed
6062- 'reference' (array<string, mixed>\| null): Context data or glossary terms to guide translation |
61- | ` $progressCallback ` | ** null \| callable ** | Invoked per batch with (percentage complete, current batch, translated batch) |
63+ | ` $progressCallback ` | ** callable \| null ** | Invoked per batch with (percentage complete, current batch, translated batch) |
6264
6365** Return Value:**
6466
@@ -78,7 +80,7 @@ When API rejects or fails to process the request
7880Localize a single string and return the translated text.
7981
8082``` php
81- public localizeText(string $text, array<string ,mixed > $params, null| callable $progressCallback = null): string
83+ public localizeText(string $text, array<string ,mixed > $params, callable|null $progressCallback = null): string
8284```
8385
8486** Parameters:**
@@ -91,7 +93,7 @@ public localizeText(string $text, array<string,mixed> $params, null|callable $pr
9193- 'sourceLocale' (string\| null): Language code of original text, null for auto-detection
9294- 'fast' (bool): Trade translation quality for speed
9395- 'reference' (array<string, mixed>\| null): Context data or glossary terms to guide translation |
94- | ` $progressCallback ` | ** null \| callable ** | Called with completion percentage (0-100) during processing |
96+ | ` $progressCallback ` | ** callable \| null ** | Called with completion percentage (0-100) during processing |
9597
9698** Return Value:**
9799
@@ -142,7 +144,7 @@ When an individual localization request fails
142144Localize a chat transcript while preserving speaker names.
143145
144146``` php
145- public localizeChat(array<int ,array <string,string >> $chat, array<string ,mixed > $params, null| callable $progressCallback = null): array<int ,array <string,string >>
147+ public localizeChat(array<int ,array <string,string >> $chat, array<string ,mixed > $params, callable|null $progressCallback = null): array<int ,array <string,string >>
146148```
147149
148150** Parameters:**
@@ -157,7 +159,7 @@ public localizeChat(array<int,array<string,string>> $chat, array<string,mixed> $
157159- 'sourceLocale' (string\| null): Language code of original messages, null for auto-detection
158160- 'fast' (bool): Trade translation quality for speed
159161- 'reference' (array<string, mixed>\| null): Context data or glossary terms to guide translation |
160- | ` $progressCallback ` | ** null \| callable ** | Called with completion percentage (0-100) during processing |
162+ | ` $progressCallback ` | ** callable \| null ** | Called with completion percentage (0-100) during processing |
161163
162164** Return Value:**
163165
0 commit comments