Skip to content

Iframe based simple Pali Lookup Dictionary for any site

License

Notifications You must be signed in to change notification settings

o28o/dictPlugin

Repository files navigation

dictPlugin

There are many ways to get dictionary lookup. Applicable for end users and webmasters.

For those who want to click the word and get the translation of the prefered Online dictionary.

Some methods that are described below were made for Pali Language using Digital Pali Dictionary (DPD), but can be customized to any Language or any Online Dictionary that supports word lookup in the URL parameters like this: https://somedict.online/?word=dukkha (GET parameters)

for End Users (site list):

May be you don't need to do anything and can just read on these sites, they have Pali lookup already

List of sites and apps that have built-in Pali Dictionary:

for End Users (requires installing browser extention or/and setup):

There are another ways to add Pali Lookup for literally any site:

Google Chrome extension

Google Chrome extention Not customizable

Microsoft Edge extension

Microsoft Edge extention Not customizable

TamperMonkey Script

TamperMonkey User Script Customizable

for Webmasters (requires adding js and css to the site code):

Simple yet very convenient Pali Lookup Dictionary for any site.

This example uses Digital Pali Dictionary as Pali Dictionary but you can modify the link and use any Dictionary of your choice. More information about DPD here.

Demos

These demos might be slightly outdated. Please check the latest live version on Dhamma.gift Read. Use "comment bubble icon" to turn word lookup on/off and "gear icon" to choose the dictionary layout.

For Demos just click on the "Bubble Icon" to turn word lookup On/Off.

Instructions

To make Pali text clickable:

  1. Clone repo

  2. The Pali text should be marked with class="pli-lang" e.g. <span class="pli-lang">Pali text</span> or <p> or <div>.

  3. Styles should be applied in the <head> section:

    <link rel="stylesheet" href="assets/css/paliLookup.css">
  4. Button should be added to html inside <body> section

    <button class="toggle-dict-btn">
      <img src="assets/svg/comment-slash.svg" class="dictIcon" alt="Toggle Dictionary">
      Toggle Dictionary
    </button>
  1. JavaScript should be applied after the Pali text, e.g., at the end of the section. You can modify connection url or desired endpoint in this file:
    <script src="assets/js/paliLookup.js"></script>
    </body>
    </html>
    

About

Iframe based simple Pali Lookup Dictionary for any site

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •