954,164 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

What does the underscore mean in: _("Undo")

Okay, it's been a long time since I've programmed in C++! Languages change considerably in the last 5 years or so. In reviewing some source code I often see statements like this:

wxString label;
      if (name == wxT("Undo")) {
         label = _("Undo");

obviously, I snipped out a lot of code.

My question is, what does the underscore mean in:

_("Undo")
edgar5
Light Poster
30 posts since Dec 2008
Reputation Points: 18
Solved Threads: 2
 

_ is usually associated with gettext with deals with text localization.

ShawnCplus
Code Monkey
Team Colleague
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268
 

OK, that might be enough for me to actually figure out what it is being used for here. I thought it might be some new C++ convention.

Thanks!

edgar5
Light Poster
30 posts since Dec 2008
Reputation Points: 18
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You