Coder Social home page Coder Social logo

aaronbuchanan / emoji-translate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from notwaldorf/emoji-translate

0.0 2.0 0.0 137 KB

:books: Translate text to ✨emoji ✨!

Home Page: http://meowni.ca/emoji-translate/

License: MIT License

JavaScript 67.16% HTML 32.84%

emoji-translate's Introduction

emoji-translate

You know how sometimes you type English and it has all these letters and words and no emoji? Yeah, emoji-translate fixes that.

Packaged demos

omg emoji

This is what you actually want, right? Can't blame you. Here you go. 👏

There's also a Chrome extension that lets you translate any page on the internet to emoji. Your nightmares are finally over.

Emoji-translate as a library

You can also use this as a standalone library for your own translation purposes.

Install

bower install emoji-translate

Usage

When emoji-translate.js is loaded, it will load json of emoji names and keywords, save it in a global called allEmojis, and fire an emoji-ready event. allEmojis has this structure:

{
  "grinning": {
    "keywords": ["face", "smile", "happy", "joy"],
    "char": "😀",
    "category": "people"
  },
  "grin": {
    "keywords": ["face", "happy", "smile", "joy"],
    "char": "😁",
    "category": "people"
  },
  ...
}

The emoji-translate api has 2 methods:

  • getMeAnEmoji(word) -- returns the emoji translation of the english word, or the empty string if one doesn't exist.
  • translateWord(word) -- returns a <span> element that contains either the original english word, or the emoji translation, ready for display.

This was made as part of an ⚡️emoji hackday⚡️ and is powered by emojilib, a magical json file of emoji names and keywords y'all should use in all your projects.

emoji-translate's People

Contributors

andreruffert avatar notwaldorf avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.