gettext.js
gettext.js copied to clipboard
Proposition to include language names
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 ;)
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