Vocab

The Vocab widget can recognise and underline words from dictionaries like Cysgair and the Termiadur Addysg on your webpage.

Users can see the dictionary entries for these words by hovering their mouse over the underlined words.

Just as with the Cysill Ar-lein widget, it’s very easy to add Vocab to your website (N.B. you will need to register for your API key, and then input it instead of ‘YOUR_API_KEY’. See How to register for an API key).

  • Add the following two <script> tags to the code of your website:
    <script type='text/javascript'>
    	var vocabConfig = {
    		apikey : 'YOUR_API_KEY',
    		language : 'cy',
    		start : 'body'
    	};		
    </script>
    <script type='text/javascript' language='javascript' src='http://api.techiaith.org/vocab/ui/vocab/vocab.nocache.js'></script>
    
    
  • Add a <div> tag with class=vocab_button anywhere on the page:
    <div class="vocab_button"></div>