On 2013-05-23 08:27, Peter Williams wrote:
An example of how I would envisage gettext being used in D is:
writefln(gettext("%s: unknown variable at line %s"), filename, linenumber);
It is a common practice, to define a macro (or equivalent) _(arg) as an
alias for gettext(arg) (and N_(arg) for gettext_noop(arg)) because
people like brevity.
I would suggest using the gettext() functionality for i18n but design
the notation used within programs (to access that functionality)
according to what best suits the D paradigm.
Is the text you want to translate the actual key? That sounds very
stupid. What if I need to change the text?
--
/Jacob Carlborg