+ if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
+ {
+ if (translate && parNode &&
+ parNode->GetPropVal(wxT("translate"), wxEmptyString) != wxT("0"))
+ {
+ return wxGetTranslation(str2);
+ }
+ else
+ {
+#if wxUSE_UNICODE
+ return str2;
+#else
+ // The string is internally stored as UTF-8, we have to convert
+ // it into system's default encoding so that it can be displayed:
+ return wxString(str2.mb_str(wxConvUTF8), wxConvLocal);
+#endif
+ }
+ }