Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a nice simplistic implementation for basic apps but could lead to a painful rewrite if you start integrating languages with significantly different grammar constructs than your home language.

If you're really serious about internationalization you need to use a more complete solution like FormatJS[1], which has a really nice React implementation[2].

1. http://formatjs.io/ 2. http://formatjs.io/react/



Agreed, yargs (the CLI app that this was built for) has very basic requirements -- there are only a few dozen strings in the entire codebase.

Having said this I did make an effort to learn from prior work in the area, basing the library on: https://github.com/mashpie/i18n-node

A friend of mine who did a thorough literature review at PayPal also advocated formatjs.io -- although I think this is a little bit too much power for little old yargs.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: