Gettext: Is it a good idea for the message ID to be the english text?

Wow, I’m surprised that no one is advocating using the English as a key. I used this style in a couple of software projects, and IMHO it worked out pretty well. The code readability is great, and if you change an English string it becomes obvious that the message needs to be considered for re-translation (which is a good thing).

In the case that you’re only correcting spelling or making some other change that definitely doesn’t require translation, it’s a simple matter to update the IDs for that string in the resource files.

That said, I’m currently evaluating whether or not to carry this way of doing I18N forward to a new project, so it’s good to hear some thoughts on why it might not be a good idea.

Leave a Comment