joeattardi / picmo

JavaScript emoji picker. Any app, any framework.
https://picmojs.com
MIT License
1.19k stars 117 forks source link

Some labels are no longer translated when the i18n property is set in version 5.8.0 #266

Closed uaza closed 1 year ago

uaza commented 1 year ago
image image

Does not work:

emojiPicker = picmoPopup.createPopup({
                  i18n: 'en'
              }, ...

If you remove the i18n property, the missing translations appear again:

emojiPicker = picmoPopup.createPopup({}, ...

PS: The integrated languages with the new version 5.8.0 are great, thank you!

joeattardi commented 1 year ago

The i18n option isn't a string, it's a reference to the translated strings object itself.

It defaults to English, otherwise you need to import the i18n object from picmo and use the corresponding language, i.e. i18n.de, i18n.fr, etc.