3 ms·
Despite internationalization, I still see this as a trivial issue. Just use a map: const plurals = {'en': { 'message': 'messages' }, 'de': { 'Nachricht': 'Nach
by escapedconvict 6y ago
Despite internationalization, I still see this as a trivial issue. Just use a map:
const plurals = {'en': { 'message': 'messages' }, 'de': { 'Nachricht': 'Nachrichten' };
You can add grammatical cases to the map to handle different plural forms. It's not like you'll need a big list/map since you're likely to use it in only a few places.