Microsoft Office Language Packs

In the same way that Visual Studio offers language packs to have multiple languages, which is really handy for developers of VS add-ins, Microsoft Office 2010 and higher also provides language packs, although not for free:

Microsoft Office 2010 Language Packs
http://www.microsoftstore.com/store/msusa/en_US/pdp/Language-Pack-for-Office-2010/productID.253665800

Microsoft Office 2013 Language Packs
http://www.microsoftstore.com/store/msusa/en_US/pdp/Office-Language-Pack-2013/productID.259321800

which are also handy for developers of add-ins for the VBA editor, to discover, for example, that the “Standard” commandbar name is localized (“Estándar” in Spanish), when it shouldn’t.

To change the language of Office you have to go to Start, All Programs, Microsoft Office, Microsoft Office 2010 Tools, Microsoft Office 2010 Language Preferences. Programmatically, you can get the language of Office through the registry key HKEY_CURRENT_USER\Software\Microsoft\Office\<version>\Common\LanguageResources, UILanguage name.

Error “The language is already installed.” installing Visual Studio language packs

As I explained in the following article:

HOWTO: Testing add-ins in localized versions of Visual Studio
http://www.mztools.com/articles/2010/MZ2010003.aspx

Visual Studio 2012 and higher allows to install additional languages (“Tools”, “Options” window, “Environment”, “International Settings” section) through language packs, rather than installing localized full versions of Visual Studio (as in previous versions):

Microsoft Visual Studio 2012 Language Pack
http://www.microsoft.com/en-us/download/details.aspx?id=30681

Microsoft Visual Studio 2013 Language Pack
http://www.microsoft.com/en-us/download/details.aspx?id=40783

When selecting a language other than English, you may find running the downloaded vs_langpack.exe setup the following error:

“The language pack is already installed. To install an additional language, please install the language pack for that language”

LanguagePackError

The problem is happening because you are actually installing the English language pack on an English Visual Studio (notice the title 2013 Language Pack – ENU). It happens that those download pages need some long seconds since you select a language in the dropdown list until the page is refreshed with the corresponding downloadable setup. If you click the “Download” button just after selecting a language in the dropdown list, you actually download the (original) English language pack. Once the page is refreshed, the whole page is localized (including the “Download” button) and then you can download the correct vs_langpack.exe setup.

Notice the amount of unfortunate events in this scenario that can confuse many people:

  • The page needs many seconds to switch the language – a bad design -.
  • No clear indication is provided to the user. The Download button is still visible and enabled.
  • The downloaded setup has the same name “vs_langpack.exe” that doesn’t include the language.
  • The setup error doesn’t say the language that you are trying to install (only the title states the “ENU” language).

How to create a solution folder inside another solution folder

Today I have received an e-mail asking if there is a workaround to the problem that I explained in the post PRB: NotImplementedException adding a solution folder to a solution folder in Visual Studio from a macro or add-in.

I hadn’t updated the post yet until today but I already hinted the solution in this other post: HOWTO: Create a project from a Visual Studio add-in inside a solution folder

The trick is to cast the EnvDTE.Project.Object property to the EnvDTE80.SolutionFolder type introduced by VS 2005.

Here it is a sample code:

Sub AddNestedFoldersToSolution()

   Dim sol2 As EnvDTE80.Solution2
   Dim solFolderProject1 As EnvDTE.Project
   Dim solFolderProject2 As EnvDTE.Project
   Dim solFolder As EnvDTE80.SolutionFolder

   sol2 = CType(DTE.Solution, EnvDTE80.Solution2)

   solFolderProject1 = sol2.AddSolutionFolder("Folder 1")

   solFolder = CType(solFolderProject1.Object, EnvDTE80.SolutionFolder)

   solFolderProject2 = solFolder.AddSolutionFolder("Folder 2")

End Sub