New features in #Tcl9 – part 5:
msgcat supports custom locale search list.
This is a nice one! When you are working in multi-lingual environments, you may want to translate strings according to your locale. But when there is no translation, msgcat falls back to some predefined other locales (or the "root" locale). But what if you want Japanese and failing that you like to keep English instead unless there is a German translation available?
You can do that now in Tcl9! You then just specify:
% msgcat::mcpreferences jp de en {}
That will make msgcat look for a Japanese translation first. It none is found, it looks for a German one and failing that for an English one.
Read more about this and some other enhancements here: