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].
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.
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/