XLL+ Class Library (7.0)


Translates a string containing resource IDs, for the language of the Excel version

BOOL XllTranslateStringW(
   const wchar_t* pszIn,
   CStringW& strOut



input string, which may contain numeric resource string identifiers. See Remarks below.


If the function succeeds, the translated string will be loaded into this variable. If it fails, then an untranslated or partially translated string will be placed here.

Return Value

TRUE if the function succeeds, FALSE if it fails. It will fail if any the resources cannot be found or if the current resource file handle is invalid. If it fails, then a partially or wholly untranslated string will be returned.


This function attempts to replace the resource string IDs in the input string with resource strings loaded from the current resource file. The resource file searched will be that returned by XllGetStringResourceHandle). The language used will be either the current user preference (as returned by GetThreadLocale()) or the language of the Excel version (as returned by XllGetExcelLanguageID).

String identifiers should be in one of the following forms:

String substitutions

String substitution by XLL+ functions

The functions, macros and data members that accept and translate resource ID strings are listed below.

CXllApp::WinMessageBox CXllApp::XlMessageBox CXllFn::m_stCategory
CXllFn::m_stHelpText CXllFn::m_astArgHelpText CXllFn::m_astArgExt
CXlMenu::Create CXlMenu::AddItem CXlMenu::SetTexts
CXlMenu::DeleteItem CXlMenu::ReplaceItem CXlMenu::EnableItem
CXlMenu::CheckItem CXlToolbar::AddSeparator CXlToolbar::AddTool
CXlToolbar::AddToolbar CXlToolbar::AssignToTool CXlToolbar::DeleteTool
CXlToolbar::DeleteToolbar CXlToolbar::EnableTool CXlToolbar::PressTool
CXlToolbar::SetToolBitmap CXlToolbar::ShowToolbar  


Header: xllres.h

See Also

Global resource functions