psycovic23
January 16th, 2009, 05:29 AM
Hey,
I'm working on a problem where error codes (and potentially, anything text in the application) must be replaceable with the same thing in a different language. What are the general schemes that people use for this?
I heard of 2 things:
1) error codes...
if (ERROR)
print errorcode(1234)
2) translation wrapper
if (ERROR)
print wrapper("invalid")
where wrapper would then lead to a big lookup table for everything under "invalid".
Are these pretty much the most widely used ones or are there more efficient ones? Thanks!
I'm working on a problem where error codes (and potentially, anything text in the application) must be replaceable with the same thing in a different language. What are the general schemes that people use for this?
I heard of 2 things:
1) error codes...
if (ERROR)
print errorcode(1234)
2) translation wrapper
if (ERROR)
print wrapper("invalid")
where wrapper would then lead to a big lookup table for everything under "invalid".
Are these pretty much the most widely used ones or are there more efficient ones? Thanks!