@tilde-nlp/website-translator 8.3.0-beta → 8.5.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.
@@ -1,3 +1,3 @@
1
1
  /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
2
2
 
3
- /*! WTW version: v8.3.0-beta */
3
+ /*! WTW version: v8.5.0-beta */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tilde-nlp/website-translator",
3
3
  "description": "Widget to integrate in to another website to translate it",
4
- "version": "8.3.0-beta",
4
+ "version": "8.5.0-beta",
5
5
  "main": "dist/widget.js",
6
6
  "directories": {
7
7
  "doc": "docs",
@@ -33,6 +33,11 @@ export interface IPluginOptions{
33
33
  * @required
34
34
  */
35
35
  url: string,
36
+ /**
37
+ * Optional direct website translation service Uri, excluding the website id.
38
+ * @example https://localhost:44367/translate/website
39
+ */
40
+ websiteTranslationUrl?: string,
36
41
  /**
37
42
  * API version
38
43
  * 1 - older version
@@ -63,6 +68,15 @@ export interface IPluginOptions{
63
68
  */
64
69
  dynamicContentDiscoveryDelayMs?: number,
65
70
 
71
+ /**
72
+ * How the selected language is persisted in the page URL.
73
+ * push - update the lang query parameter and create a history entry (legacy default).
74
+ * replace - update the lang query parameter without creating a history entry.
75
+ * none - leave the host URL and links unchanged.
76
+ * @default push
77
+ */
78
+ languageUrlMode?: 'push' | 'replace' | 'none',
79
+
66
80
  targetLanguages:Array<string>
67
81
  /**
68
82
  * Translate only tags and their children which have [translate="yes"] attribute