gettext.js icon indicating copy to clipboard operation
gettext.js copied to clipboard

Proposition to include language names

Open Nico-Duduf opened this issue 2 years ago • 1 comments

I've added this for some of my projects, thought it may be useful; it's not a big overweight but helps to quickly setup language selectors.

The language names are localized instead of English, that makes more sense in UIs, and use the "menu" variant (for better alphabetical sorting).

If you think it's too large to be included, I understand ;)

Nico-Duduf avatar Aug 02 '22 08:08 Nico-Duduf

Hi Nicolas,

Thank you for this pull request and your usage of gettext ;)

As you suspected, the main interest of this lib (against the many others that exist out there) is to be very lightweight and efficient for translating strings frontend. I still think its sole purpose should be only translating, and not in some way help with UI or other things.

That being said, I'm not against shipping some extensions / tools alongside gettext.js if some users find any interest in them. Maybe you should package your logic in a separate file that would decorate gettextjs to add these methods and languages ?

Hope that trade-off would suit you ;)

A bientôt

guillaumepotier avatar Aug 12 '22 08:08 guillaumepotier