@tilde-nlp/website-translator 8.2.0-beta.21 → 8.3.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,11 +8,19 @@
8
8
 
9
9
  # Website Translator
10
10
 
11
- [![Node.js Package](https://github.com/tilde-nlp/website-translator/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/tilde-nlp/website-translator/actions/workflows/npm-publish.yml)
11
+ [![Publish Beta Package](https://github.com/tilde-nlp/website-translator/actions/workflows/publish-beta.yml/badge.svg)](https://github.com/tilde-nlp/website-translator/actions/workflows/publish-beta.yml)
12
12
 
13
13
  Quickly scale up from one language to a dozen!
14
14
  No coding, manual translation, or duplicated webpages! Simply select the target languages and Website Translator will instantly translate the content. For quality control, you can review and edit translations with a visual editor.
15
15
 
16
+ Versions `8.x` are currently published under the npm `beta` dist-tag. See the [changelog](changelog.md) for release details.
17
+
18
+ ```bash
19
+ npm install @tilde-nlp/website-translator@beta
20
+ ```
21
+
22
+ This installs the version currently assigned to npm's `beta` dist-tag. The tag is updated to the newest beta build after each successful beta publication. For reproducible installations, pin a full version such as `8.2.0-beta.42`.
23
+
16
24
  # Usage
17
25
 
18
26
  Include a reference to the Website Translator
@@ -70,6 +78,22 @@ Default language selector can be displayed as a dropdown or a list of buttons th
70
78
  </html>
71
79
  ```
72
80
 
81
+ ## Configure dynamic content discovery
82
+
83
+ `single-batch` and `word-count` modes wait for an inactivity window before completing dynamic content discovery. The window restarts whenever another discovery pass runs and defaults to 5000 ms.
84
+
85
+ Set `dynamicContentDiscoveryDelayMs` before initialization to accommodate the website's loading behaviour:
86
+
87
+ ```HTML
88
+ <script>
89
+ WebsiteTranslator.Options.translation.mode = "single-batch";
90
+ WebsiteTranslator.Options.translation.dynamicContentDiscoveryDelayMs = 10000;
91
+ WebsiteTranslator.Initialize();
92
+ </script>
93
+ ```
94
+
95
+ The same setting applies when `mode` is `"word-count"`. Set it to `0` to complete discovery immediately after the initial pass. Invalid or negative values use the 5000 ms default.
96
+
73
97
  # Browser support
74
98
 
75
99
  <!--