]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_choic.cpp
__WINDOWS__, not __WXMSW__
[wxWidgets.git] / contrib / src / xrc / xh_choic.cpp
index e9ff297b64696e759a54d04709547e81f4082118..15f7c6a77cecc5161bf373bb60105bbd2cd826cf 100644 (file)
@@ -21,6 +21,9 @@
 
 #include "wx/xrc/xh_choic.h"
 #include "wx/choice.h"
+#include "wx/intl.h"
+
+IMPLEMENT_DYNAMIC_CLASS(wxChoiceXmlHandler, wxXmlResourceHandler)
 
 wxChoiceXmlHandler::wxChoiceXmlHandler() 
 : wxXmlResourceHandler() , m_insideBox(FALSE)
@@ -76,7 +79,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;
     }