func: print "Hello World"
and be done with it. But when you grow, you realize that you need it to be able to print hello world in many languages so you add I18N
func: unicodePrint(geti18N(HELLO_WORLD))
getI18n(I18N_KEY): curlang.get(I18N_KEY)
1091_en: "Hello World
and then someone accidentally broke something so you want to be able to unit test it.
func(printer=stdoutprinter): printer.unicodePrint(geti18N(HELLO_WORLD))
getI18n(I18N_KEY): curlangmap.get(I18N_KEY)
interface printer ...
singleton stdoutprinter ...
Ideally you'd want a framework that caters to all of these stages
func: print "Hello World"
and be done with it. But when you grow, you realize that you need it to be able to print hello world in many languages so you add I18N
func: unicodePrint(geti18N(HELLO_WORLD))
getI18n(I18N_KEY): curlang.get(I18N_KEY)
1091_en: "Hello World
and then someone accidentally broke something so you want to be able to unit test it.
func(printer=stdoutprinter): printer.unicodePrint(geti18N(HELLO_WORLD))
getI18n(I18N_KEY): curlangmap.get(I18N_KEY)
1091_en: "Hello World
interface printer ...
singleton stdoutprinter ...
Ideally you'd want a framework that caters to all of these stages