本文介绍了国际化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在尝试从字符串表中加载一串字符串来预加载语言。I'm trying to load a bunch of strings rrom the String Table to pre-load the language. 它设置为UNICODE 仍然,不会工作j [vode] [/ code] [code][code] void CPropertiesWnd :: LoadI18NPropNames() { / * DEBUG * / TRACE(" void CPropertiesWnd :: LoadI18NPropNames()>> \ n"); //外观 ASSERT(m_strI18NPropNameAppearence.LoadString(IDS_I18N_PROP_NAME_APPEARENCE)); ASSERT(m_strI18NProp NameAppearence.LoadString(IDS_I18N_PROP_NAME_APPEARENCE)); $ ASSERT(m_strI18NPropName3DLook.LoadString(IDS_I18N_PROP_NAME_3DLOOK)); ASSERT(m_strI18NPropName3DLookComment.LoadString(IDS_I18N_PROP_NAME_APPEARENCE_COMMENT)); $ ASSERT(m_strI18NPropNameBorder.LoadString(IDS_I18N_PROP_NAME_BORDER)); ASSERT(m_strI18NPropNameBorderComment.LoadString(IDS_I18N_PROP_NAME_BORDER_COMMENT)); ASSERT(m_strI18NBorderOptions [0] .LoadString(IDS_I18N_PROP_NAME_BORDER_NONE)); ASSERT(m_strI18NBorderOptions [1] .LoadString(IDS_I18N_PROP_NAME_BORDER_THIN)); ASSERT(m_strI18NBorderOptions [2] .LoadString(IDS_I18N_PROP_NAME_BORDER_RESIZABLE)); ASSERT(m_strI18NBorderOptions [3] .LoadString(IDS_I18N_PROP_NAME_BORDER_DIALOGFRAME)); $ ASSERT(m_strI18NPropNameCaption.LoadString(IDS_I18N_PROP_NAME_CAPTION)); ASSERT(m_strI18NPropNameWindowsSize.LoadString(IDS_I18N_PROP_NAME_WINDOWHEIGHT)); ASSERT(m_strI18NPropNameWidth.LoadString(IDS_I18N_PROP_NAME_WIDTH)); ASSERT(m_strI18NPropNameWidthComment.LoadString(IDS_I18N_PROP_NAME_WIDTH_COMMENT)); ASSERT(m_strI18NPropNameHeight.LoadString(IDS_I18N_PROP_NAME_HEIGHT)); ASSERT(m_strI18NPropNameHeightComment.LoadString(IDS_I18N_PROP_NAME_HEIGHT_COMMENT)); $ // Misc ASSERT(m_strI18NPro pNameMisc.LoadString(IDS_I18N_PROP_NAME_MISC)); ASSERT(m_strI18NPropNameAppName.LoadString(IDS_I18N_PROP_NAME_APPNAME)); ASSERT(m_strI18NPropNameWindowColor.LoadString(IDS_I18N_PROP_NAME_WINDOWCOLOR)); ASSERT(m_strI18NPropNameWindowColorComment.LoadString(IDS_I18N_PROP_NAME_WINDOWCOLOR_COMMENT)); ASSERT(m_strI18NPropNameOther.LoadString(IDS_I18N_PROP_NAME_OTHER)); ASSERT(m_strI18NPropNameDefault.LoadString(IDS_I18N_PROP_NAME_DEFAULT)); $ ASSERT(m_strI18NPropNameCaption.LoadString(IDS_I18N_PROP_NAME_CAPTION)); ASSERT(m_strI18NPropNameMisc.LoadString( IDS_I18N_PROP_NAME_MISC)); ASSERT(m_strI18NPropNameIcon.Load字符串(IDS_I18N_PROP_NAME_ICON)); ASSERT(m_strI18NPropNameIconComment.LoadString(IDS_I18N_PROP_NAME_ICON_COMMENT)); ASSERT(m_strI18NPropNameFolder.LoadString(IDS_I18N_PROP_NAME_FOLDER)); $ //字体 ASSERT(m_strI18NPropNameFont.LoadString(IDS_I18N_PROP_NAME_FONT)) ; $ ASSERT(m_strI18NPropNameFontComment.LoadString(IDS_I18N_PROP_NAME_FONT_COMMENT)); ASSERT(m_strI18NPropNameUserSystemFont.LoadString(IDS_I18N_PROP_NAME_USERSYSTEMFONT)); $ //检查邮件 ASSERT(m_strI18NPropNameMailServer.LoadString(IDS_I18N_PROP_NAME_MAILSEVER)); ASSERT(m_strI18NPropNameUserName1.LoadString(IDS_I18N_PROP_NAME_USERNAME1)); // ASSERT(IDS_I18N_PROP_GROUPNAME) ASSERT(m_strI18NPropNameOther.LoadString(IDS_I18N_PROP_NAME_OTHER)); ASSERT(m_strI18NPropNameDefault.LoadString(IDS_I18N_PROP_NAME_DEFAULT)); ASSERT(m_strI18NPropNameCheckInterval.LoadString(IDS_I18N_PROP_NAME_CHECKINTERVAL)); $ ASSERT(m_strI18NPropNameCheckWithoutNetworkConnection.LoadString(IDS_I18N_PROP_NAME_CHECKWITHOUTNETWORKCONNECTION)); ASSERT(m_strI18NPropNameCheckWhenUsingOnlyBattery.LoadString(IDS_I18N_PROP_NAME_CHECKWHENUSINGONLYBATTERY)); //一般 ASSERT(m_strI18NPropNameReaName.LoadString(IDS_I18N_PROP_NAME_REALNAME)); ASSERT(m_strI18NPropNameEmail.LoadString(IDS_I18N_PROP_NAME_EMAIL)); ASSERT(m_strI18NPropNameSMTPServer.LoadString(IDS_I18N_PROP_NAME_SMTPSERVER)); ASSERT(m_strI18NPropNameAllowAuth.LoadString(IDS_I18N_PROP_NAME_ALLOWAUTH)); $ // ASSERT(m_strI18NPropNameHierachy.LoadString(IDS_I18N_PROP_NAME_HIERACHY)); $ // ASSERT(m_strI18NPropNameFirstSubLevel.LoadString(IDS_I18N_PROP_NAME_FIRSTSUBLEVEL)); $ // ASSERT(m_strI18NPropNameSecondSubLevel.LoadString (IDS_I18N_PROP_NAME_SECONDSUBLEVEL)); $ // ASSERT(m_strI18NPropNameThirdSubLevel.LoadString(I DS_I18N_PROP_NAME_THIRDSUBLEVEL)); $ $ ASSERT(m_strI18NPropNameCheckingMail.LoadString( IDS_I18N_PROP_NAME_CHECKINGMAIL)); $ ASSERT(m_strI18NPropNameUserName2.LoadString(IDS_I18N_PROP_NAME_USERNAME2)); ASSERT(m_strI18NPropNameSendOnCheck.LoadString(IDS_I18N_PROP_NAME_SENDONCHECK)); ASSERT(m_strI18NPropNameSecureSocketsWhenReceiving.LoadString(IDS_I18N_PROP_NAME_SECURESOCKETSWHENRECEIVING)); $ ASSERT(m_strI18NPropNameIncomingMail.LoadString(IDS_I18N_PROP_NAME_INCOMINGMAIL)); ASSERT(m_strI18NPropNameIncomingMailLeaveMailOnServer。 LoadString(IDS_I18N_PROP_NAME_LEAVEMAILONSERVER)); $ ASSERT(m_strI18NPropNameIncomi) ngMailServerConfig.LoadString(IDS_I18N_PROP_NAME_CONFIGSERVER)); $ / * DEBUG * / TRACE(" void CPropertiesWnd :: LoadI18NPropNames()<< \ n"); }void CPropertiesWnd::LoadI18NPropNames(){/* DEBUG */ TRACE("void CPropertiesWnd::LoadI18NPropNames() >> \n");// Apperance ASSERT(m_strI18NPropNameAppearence.LoadString(IDS_I18N_PROP_NAME_APPEARENCE));ASSERT(m_strI18NPropNameAppearence.LoadString(IDS_I18N_PROP_NAME_APPEARENCE));ASSERT(m_strI18NPropName3DLook.LoadString(IDS_I18N_PROP_NAME_3DLOOK));ASSERT(m_strI18NPropName3DLookComment.LoadString(IDS_I18N_PROP_NAME_APPEARENCE_COMMENT));ASSERT(m_strI18NPropNameBorder.LoadString(IDS_I18N_PROP_NAME_BORDER));ASSERT(m_strI18NPropNameBorderComment.LoadString(IDS_I18N_PROP_NAME_BORDER_COMMENT));ASSERT(m_strI18NBorderOptions[0].LoadString(IDS_I18N_PROP_NAME_BORDER_NONE));ASSERT(m_strI18NBorderOptions[1].LoadString(IDS_I18N_PROP_NAME_BORDER_THIN));ASSERT(m_strI18NBorderOptions[2].LoadString(IDS_I18N_PROP_NAME_BORDER_RESIZABLE));ASSERT(m_strI18NBorderOptions[3].LoadString(IDS_I18N_PROP_NAME_BORDER_DIALOGFRAME));ASSERT(m_strI18NPropNameCaption.LoadString(IDS_I18N_PROP_NAME_CAPTION));ASSERT(m_strI18NPropNameWindowsSize.LoadString(IDS_I18N_PROP_NAME_WINDOWHEIGHT));ASSERT(m_strI18NPropNameWidth.LoadString(IDS_I18N_PROP_NAME_WIDTH));ASSERT(m_strI18NPropNameWidthComment.LoadString(IDS_I18N_PROP_NAME_WIDTH_COMMENT));ASSERT(m_strI18NPropNameHeight.LoadString(IDS_I18N_PROP_NAME_HEIGHT));ASSERT(m_strI18NPropNameHeightComment.LoadString(IDS_I18N_PROP_NAME_HEIGHT_COMMENT));// MiscASSERT(m_strI18NPropNameMisc.LoadString(IDS_I18N_PROP_NAME_MISC));ASSERT(m_strI18NPropNameAppName.LoadString(IDS_I18N_PROP_NAME_APPNAME));ASSERT(m_strI18NPropNameWindowColor.LoadString(IDS_I18N_PROP_NAME_WINDOWCOLOR));ASSERT(m_strI18NPropNameWindowColorComment.LoadString(IDS_I18N_PROP_NAME_WINDOWCOLOR_COMMENT));ASSERT(m_strI18NPropNameOther.LoadString(IDS_I18N_PROP_NAME_OTHER));ASSERT(m_strI18NPropNameDefault.LoadString(IDS_I18N_PROP_NAME_DEFAULT));ASSERT(m_strI18NPropNameCaption.LoadString(IDS_I18N_PROP_NAME_CAPTION));ASSERT(m_strI18NPropNameMisc.LoadString(IDS_I18N_PROP_NAME_MISC));ASSERT(m_strI18NPropNameIcon.LoadString(IDS_I18N_PROP_NAME_ICON));ASSERT(m_strI18NPropNameIconComment.LoadString(IDS_I18N_PROP_NAME_ICON_COMMENT));ASSERT(m_strI18NPropNameFolder.LoadString(IDS_I18N_PROP_NAME_FOLDER));// FontASSERT(m_strI18NPropNameFont.LoadString(IDS_I18N_PROP_NAME_FONT));ASSERT(m_strI18NPropNameFontComment.LoadString(IDS_I18N_PROP_NAME_FONT_COMMENT));ASSERT(m_strI18NPropNameUserSystemFont.LoadString(IDS_I18N_PROP_NAME_USERSYSTEMFONT));// Checking MailASSERT(m_strI18NPropNameMailServer.LoadString(IDS_I18N_PROP_NAME_MAILSEVER));ASSERT(m_strI18NPropNameUserName1.LoadString(IDS_I18N_PROP_NAME_USERNAME1));//ASSERT(IDS_I18N_PROP_GROUPNAMEASSERT(m_strI18NPropNameOther.LoadString(IDS_I18N_PROP_NAME_OTHER));ASSERT(m_strI18NPropNameDefault.LoadString(IDS_I18N_PROP_NAME_DEFAULT));ASSERT(m_strI18NPropNameCheckInterval.LoadString(IDS_I18N_PROP_NAME_CHECKINTERVAL));ASSERT(m_strI18NPropNameCheckWithoutNetworkConnection.LoadString(IDS_I18N_PROP_NAME_CHECKWITHOUTNETWORKCONNECTION));ASSERT(m_strI18NPropNameCheckWhenUsingOnlyBattery.LoadString(IDS_I18N_PROP_NAME_CHECKWHENUSINGONLYBATTERY));// General ASSERT(m_strI18NPropNameReaName.LoadString(IDS_I18N_PROP_NAME_REALNAME));ASSERT(m_strI18NPropNameEmail.LoadString(IDS_I18N_PROP_NAME_EMAIL));ASSERT(m_strI18NPropNameSMTPServer.LoadString(IDS_I18N_PROP_NAME_SMTPSERVER));ASSERT(m_strI18NPropNameAllowAuth.LoadString(IDS_I18N_PROP_NAME_ALLOWAUTH));// ASSERT(m_strI18NPropNameHierachy.LoadString(IDS_I18N_PROP_NAME_HIERACHY));// ASSERT(m_strI18NPropNameFirstSubLevel.LoadString(IDS_I18N_PROP_NAME_FIRSTSUBLEVEL));// ASSERT(m_strI18NPropNameSecondSubLevel.LoadString(IDS_I18N_PROP_NAME_SECONDSUBLEVEL));// ASSERT(m_strI18NPropNameThirdSubLevel.LoadString(IDS_I18N_PROP_NAME_THIRDSUBLEVEL));ASSERT(m_strI18NPropNameCheckingMail.LoadString(IDS_I18N_PROP_NAME_CHECKINGMAIL));ASSERT(m_strI18NPropNameUserName2.LoadString(IDS_I18N_PROP_NAME_USERNAME2));ASSERT(m_strI18NPropNameSendOnCheck.LoadString(IDS_I18N_PROP_NAME_SENDONCHECK));ASSERT(m_strI18NPropNameSecureSocketsWhenReceiving.LoadString(IDS_I18N_PROP_NAME_SECURESOCKETSWHENRECEIVING));ASSERT(m_strI18NPropNameIncomingMail.LoadString(IDS_I18N_PROP_NAME_INCOMINGMAIL));ASSERT(m_strI18NPropNameIncomingMailLeaveMailOnServer.LoadString(IDS_I18N_PROP_NAME_LEAVEMAILONSERVER));ASSERT(m_strI18NPropNameIncomingMailServerConfig.LoadString(IDS_I18N_PROP_NAME_CONFIGSERVER));/* DEBUG */ TRACE("void CPropertiesWnd::LoadI18NPropNames() << \n");} [/ code]推荐答案 啊。他们只是"活着"在ASSERT电话中他们不是吗?Ah. They only "live" in the ASSERT call don-t they? 这篇关于国际化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 07-29 13:05