【发布时间】:2014-11-06 20:30:12
【问题描述】:
除了 wxTextEntryDialog 对话框中包含的“确定”和“取消”之外,我的应用程序的所有翻译都运行良好。 我怎样才能正确翻译这些内容? 使用 OK 和 Cancel 时,即使 wxMessageBox 也能正常工作,但 wxTextEntryDialog 似乎不能翻译成任何其他语言。
我在我的代码中使用了以下 sn-ps 语言分配:
wxLocale m_locale; // locale we'll be using (this is defined in the header file of my app)
// Within the source
lang = wxLANGUAGE_CHINESE_SIMPLIFIED; // for e.g. could be any language
m_locale.Init(lang);
// normally this wouldn't be necessary as the catalog files would be found in the default locations, but when the program is not installed the
// catalogs are in the build directory where we wouldn't find them by default
wxLocale::AddCatalogLookupPathPrefix(wxT(LanguagePath));// add path of install
// Initialize the catalogs we'll be using
m_locale.AddCatalog(_("messages")); // .mo file generated by my application language specific .mo file
提前感谢您的帮助。
【问题讨论】:
标签: c++ visual-c++ translation wxwidgets