]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_choic.cpp
XRCID lookup now handles standard IDs correctly
[wxWidgets.git] / contrib / src / xrc / xh_choic.cpp
index e9ff297b64696e759a54d04709547e81f4082118..f2dd0bdb43b5f3ed90444be3996bca6da64f407d 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "wx/xrc/xh_choic.h"
 #include "wx/choice.h"
+#include "wx/intl.h"
 
 wxChoiceXmlHandler::wxChoiceXmlHandler() 
 : wxXmlResourceHandler() , m_insideBox(FALSE)
@@ -76,7 +77,10 @@ wxObject *wxChoiceXmlHandler::DoCreateResource()
         // handle <item>Label</item>
         
         // add to the list
-        strList.Add(GetNodeContent(m_node));
+        wxString str = GetNodeContent(m_node);
+        if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
+            str = wxGetTranslation(str);
+        strList.Add(str);
 
         return NULL;
     }