Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Detect non-existing terms among the given ones - in any of accessible TermCollections

Request

GET editor/termcollection/searchtermexists

Params

searchTerms Required. Should be given as JSON-encoded array structured in the following way:

Code Block
languagejs
titleJSON structure
collapsetrue
[
    {
        "term": "Some existing term 1",
		"anyOtherProp1": "Some other value 1",
 		"anyOtherProp2": "Some other value 2", 
     },
     {
        "term": "Some non-existing term 1",
		"anyOtherProp1": "Some other value 3",
 		"anyOtherProp2": "Some other value 4", 
     },
     {
        "term": "Some non-existing term 2",
		"anyOtherProp1": "Some other value 5",
 		"anyOtherProp2": "Some other value 6", 
     }
 ]



targetLang Required. Should be given as RFC5646 language code representing a major language (e.g. 'en') or with sublanguage (e.g. 'en-US'), but keep in mind that sublanguage will be ignored.

Important: this endpoint is currently used internally by Translate5's InstantTranslate plugin , and allows to exclude existing terms from the given ones, so only non-existing are returned in responseonly - to show 'Propose as new term in TermPortal'-button for translations that are not existing in terminology so far

Code Block
languagejs
titleResponse
collapsetrue
{
    "rows: [
	     {
    	    "term": "Some non-existing term 1",
			"anyOtherProp1": "Some other value 3",
	 		"anyOtherProp2": "Some other value 4", 
    	 },
 	     {
    	    "term": "Some non-existing term 2",
			"anyOtherProp1": "Some other value 5",
	 		"anyOtherProp2": "Some other value 6", 
    	 }
     ]
}


...