Skip to content

Commit 7a42292

Browse files
authored
update doc
1 parent 9a7c280 commit 7a42292

1 file changed

Lines changed: 0 additions & 40 deletions

File tree

docs/BROWSER_USAGE.md

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -212,46 +212,6 @@ The most common browser use case is loading files from an `<input type="file">`
212212
</script>
213213
```
214214

215-
### Processing Translations
216-
217-
```html
218-
<script type="module">
219-
import { getProcessor } from 'aac-processors';
220-
221-
async function translateFile(file, translations) {
222-
const extension = '.' + file.name.split('.').pop();
223-
const processor = getProcessor(extension);
224-
const arrayBuffer = await file.arrayBuffer();
225-
226-
// Process texts with translations
227-
const translatedBuffer = await processor.processTexts(
228-
arrayBuffer,
229-
translations,
230-
null // Don't save to file, return buffer
231-
);
232-
233-
// Create download link
234-
const blob = new Blob([translatedBuffer], { type: 'application/octet-stream' });
235-
const url = URL.createObjectURL(blob);
236-
const a = document.createElement('a');
237-
a.href = url;
238-
a.download = 'translated-' + file.name;
239-
a.click();
240-
URL.revokeObjectURL(url);
241-
}
242-
243-
// Usage
244-
const translations = new Map([
245-
['Hello', 'Hola'],
246-
['Goodbye', 'Adiós'],
247-
['Yes', ''],
248-
['No', 'No']
249-
]);
250-
251-
translateFile(myFile, translations);
252-
</script>
253-
```
254-
255215
## Supported File Types
256216

257217
### Browser-Compatible Processors

0 commit comments

Comments
 (0)