3 ms·
As with most things in development, it looks trivial. In an MVP it is trivial (as your code demonstrates). Now try it in an internationalized app. It's a matte
by onion2k 6y ago
As with most things in development, it looks trivial. In an MVP it is trivial (as your code demonstrates).
Now try it in an internationalized app. It's a matter of handling up to 6 plural forms (http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html#f1 http://docs.translatehouse.org/projects/localization-guide/e... - see Arabic). That's a lot more effort than just having 1 translated line of text for "messages".
- escapedconvict 6y agoDespite 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.