A new sample for using the IBM Watson Content Hub (WCH) Delivery and Authoring Context Search API is now available for download on GitHub.

locale-based content search

This sample illustrates the locale-based search capability of IBM Watson Content Hub (WCH). It is built in JavaScript and HTML and allows the user to try out the new locale-based search capabilities. Try out the sample by changing your current language preference in your browser. Doing this will change your current ‘Accept-Language’ request header which will be used by Watson Content Hub to search for and retrieve content items whose language matches a language in the ‘Accept-Language’ list.

More details may be found in the sample’s readme.

Screenshots of sample in use

The first screenshot show the results returned by the API when the browser locale language is set to ‘EN’. One content item is returned as it is the only one which has been assigned this language.

The second screenshot is similar to the first but here the browser language has been changed to ‘FR’ and therefore a French content item is returned

Resources

API Explorer reference documentation: https://developer.ibm.com/api/view/id-618

Watson Content Hub developer center: https://developer.ibm.com/wch

Watson Content Hub forum: https://developer.ibm.com/answers/smartspace/wch

 

Join The Discussion

Your email address will not be published. Required fields are marked *