X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/02df379910a86bdde7e81b7f62d890cc314b4554..adb8a71bbc0ba11aad0b417db24f7267a250b6c3:/contrib/src/xrc/xh_choic.cpp diff --git a/contrib/src/xrc/xh_choic.cpp b/contrib/src/xrc/xh_choic.cpp index 2f91e382a8..15f7c6a77c 100644 --- a/contrib/src/xrc/xh_choic.cpp +++ b/contrib/src/xrc/xh_choic.cpp @@ -23,6 +23,8 @@ #include "wx/choice.h" #include "wx/intl.h" +IMPLEMENT_DYNAMIC_CLASS(wxChoiceXmlHandler, wxXmlResourceHandler) + wxChoiceXmlHandler::wxChoiceXmlHandler() : wxXmlResourceHandler() , m_insideBox(FALSE) { @@ -77,7 +79,10 @@ wxObject *wxChoiceXmlHandler::DoCreateResource() // handle Label // add to the list - strList.Add(wxGetTranslation(GetNodeContent(m_node))); + wxString str = GetNodeContent(m_node); + if (m_resource->GetFlags() & wxXRC_USE_LOCALE) + str = wxGetTranslation(str); + strList.Add(str); return NULL; }