Implement a gettext-like translation mechanism.