mervick / emojionearea

Emoji Picker Plugin for jQuery
https://jsfiddle.net/mervick/1v03Lqnu/765/
MIT License
954 stars 257 forks source link

Options for i18n title of buttons/category/emoji/search... etc. #128

Open Banana-In-Black opened 7 years ago

Banana-In-Black commented 7 years ago

1) Or an option to disable all these l10n string ?

2) Is there an option to hide search field ?

Thank you.

regentropft commented 7 years ago

this is a great feature request. i support it!

it would also be great if there is an option to choose between different translations via option. translations could be provided by the community. only the support in the code of choosing a different language would be great.

i.e. var default_options = { language : "en" // (choose between different languages (i.e. "en","de","fr"). }

hacknlove commented 5 years ago

This is my workaround

      .emojionearea-scroll-area {
        .emojionearea-category {
          .emojionearea-category-title {
            display: none;
          }
          &::before {
            display: block;
            font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
            font-size: 13px;
            font-weight: normal;
            color: #b2b2b2;
            background: #FFFFFF;
            line-height: 20px;
            margin: 0;
            padding: 7px 0 5px 6px;
          }
        }
        .emojionearea-category[name=recent] {
          &::before {
            content: 'Reciente';
          }
        }
        .emojionearea-category[name=smileys_people] {
          &::before {
            content: 'Caritas';
          }
        }
        .emojionearea-category[name=animals_nature] {
          &::before {
            content: 'Animales y naturaleza';
          }
        }
        .emojionearea-category[name=food_drink] {
          &::before {
            content: 'Comida y bebida';
          }
        }
        .emojionearea-category[name=activity] {
          &::before {
            content: 'Actividades';
          }
        }
        .emojionearea-category[name=travel_places] {
          &::before {
            content: 'Viajes y lugares';
          }
        }
        .emojionearea-category[name=objects] {
          &::before {
            content: 'Objetos';
          }
        }
        .emojionearea-category[name=symbols] {
          &::before {
            content: 'Símbolos';
          }
        }
        .emojionearea-category[name=flags] {
          &::before {
            content: 'Banderas';
          }
        }
        .emojionearea-category[name=tones] {
          &::before {
            content: 'Diversidad';
          }
        }
      }

Eventually I am going to need multilingual support, and I will achieve that with some css class

I will share that too if the properly js solution is not done by then

mervick commented 5 years ago

You can set it in options, example

$("#emojionearea").emojioneArea({
  placeholder: "Type text here",
  searchPlaceholder: "SEARCH",
  buttonTitle: "Use the TAB key to insert emoji faster",
  filters: {
    tones: {title: "Diversity"},
    recent: {title: "Recent"},
    smileys_people: {title: "Smileys & People"},
    animals_nature: {title: "Animals & Nature"},
    food_drink: {title: "Food & Drink"},
    activity: {title: "Activity"},
    travel_places: {title: "Travel & Places"},
    objects: {title: "Objects"},
    symbols: {title: "Symbols"},
    flags: {title: "Flags"},
  }
});