Show TOC

TranslationLocate this document in the navigation structure

Prerequisites

Make sure that you have a GWM Visual Studio Add-In project for either the GWM Outlook add-in or the GWM Excel add-in.

Context

Note To understand how to localize text, we use an example based on RibbonRegion.resx.

The process for localization is the same regardless of the GWM Visual Studio Add-In project you have, (GWM Outlook add-in , or GWM Excel add-in).

Procedure

  1. Open the Solution Explorer and do the following:
    For a GWM Outlook add-in project:

    Choose Start of the navigation path Project folder Next navigation step Outlook Next navigation step Common Next navigation step UIResources End of the navigation path.

    For GWM Excel add-in project:

    Choose Start of the navigation path Project folder Next navigation step Excel Next navigation step UIResources End of the navigation path.

    The UIResources folder displays the following:
    • ErrorMessages.resx
    • ResourceBuildScript.bat
    • RibbonRegion.resx
    • Tabs.resx (not applicable to GWM Excel add-in project)
    • UIDialog.resx
  2. Double click on the RibbonRegion.resx to view and edit the ribbon text.
    The RibbonRegion.resx file opens. All the text that is used in the ribbon (in the GWM Outlook add-in, or in the GWM Excel add-in) are displayed in the RibbonRegion.resx file.

    RibbonRegion

  3. Click in the Value column of the text to be changed.
    Change the name of the GWM Outlook add-in, for example, SAP Contact Add-In; or in GWM Excel add-in change the name of the button, GETALL to Retrieve, for example.
  4. Build the project and verify that the changes are visible.

Adapting Add-In Locale Settings

Prerequisites

Ensure that you have installed the relevant Visual Studio Software Development Kit (SDK) for the Visual Studio (2010, 2012, or 2013) you have, in order to modify the ResourceBuildScript.batfile.
Setup the SDK path in the environment variable with the location where the SDK is installed, to setup:
@set sdkpath="c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin"

Context

The section above shows how to modify an existing file in the generated GWM project. This section provides instructions on how to adapt the UI components to the preferred language.

To demonstrate the procedure to translate to the German language, we create a RibbonRegion resource file specific to German Locale. German locale is usually identified by resource files names ending with .de-DE

The following are examples of languages and their file extension names:
Table 1: Example languages and their file extension names
Languages Extensions
English US .en-US
German .de-DE
French (France) .fr-FR
Japanese (Japan) .ja-JP

Procedure

  1. From Microsoft Visual Studio, open the Solution Explorer and do the following:
    For a GWM Outlook add-in project:

    Choose Start of the navigation path Project folder Next navigation step Outlook Next navigation step Common Next navigation step UIResources End of the navigation path.

    For GWM Excel add-in project:

    Choose Start of the navigation path Project folder Next navigation step Excel Next navigation step UIResources End of the navigation path.

    The UIResources folder will have the following files:
    • ErrorMessages.resx
    • ResourceBuildScript.bat
    • RibbonRegion.resx
    • Tabs.resx (not applicable to GWM Excel add-in project)
    • UIDialog.resx
  2. Copy and paste each of the .resx files located in the UIResources folder and rename them to include the de-DE siffix. For example, RibbonRegion.de-DE.resx.
  3. In the .resx files, maintain the translated text in the Value column, and translate the English values to German.
  4. Double click on the ResourceBuildScript.bat file to open it in the designer.
    Note You can run the ResourceBuildScript.bat file when the SDK is installed.

    Below is an image showing theResourceBuildScript.bat file in GWM Outlook add-in projectBatFile

  5. Define the appropriate culture specific DLL in the .bat File.
    From the existing resource, you may change the culture extension from en-US to de-DE as shown in the following code for GWM Outlook add-in:
    %sdkpath%\resgen.exe ..\..\Outlook\Common\UIResources\RibbonRegion.de-DE.resx ..\..\Outlook\Common\UIResources\RibbonRegion_de-DE.resources
    %sdkpath%\resgen.exe ..\..\Outlook\Common\UIResources\UIDialog.de-DE.resx ..\..\Outlook\Common\UIResources\UIDialog_de-DE.resources
    %sdkpath%\resgen.exe ..\..\Outlook\Common\UIResources\Tabs.de-DE.resx ..\..\Outlook\Common\UIResources\Tabs_de-DE.resources
    %sdkpath%\resgen.exe ..\..\Outlook\Common\UIResources\ErrorMessages.de-DE.resx ..\..\Outlook\Common\UIResources\ErrorMessages_de-DE.resources
    
    %sdkpath%\Al.exe /t:lib /embed:..\..\Outlook\Common\UIResources\RibbonRegion_de-DE.resources /culture:en-US /out:..\..\Outlook\Common\UIResources\RibbonRegion_de-DE.dll
    %sdkpath%\Al.exe /t:lib /embed:..\..\Outlook\Common\UIResources\UIDialog_de-DE.resources /culture:en-US /out:..\..\Outlook\Common\UIResources\UIDialog_de-DE.dll
    %sdkpath%\Al.exe /t:lib /embed:..\..\Outlook\Common\UIResources\Tabs_de-DE.resources /culture:en-US /out:..\..\Outlook\Common\UIResources\Tabs_de-DE.dll
    %sdkpath%\Al.exe /t:lib /embed:..\..\Outlook\Common\UIResources\ErrorMessages_de-DE.resources /culture:en-US /out:..\..\Outlook\Common\UIResources\ErrorMessages_de-DE.dll
    

    The following code is an example for defining the culture extension in a GWM Excel add-in project:

    15. %sdkpath%\resgen.exe ..\..\Excel\UIResources\RibbonRegion.de-DE.resx ..\..\Excel\UIResources\RibbonRegion_de-DE.resources 
    %sdkpath%\resgen.exe ..\..\Excel\UIResources\UIDialog.de-DE.resx ..\..\Excel\UIResources\UIDialog_de-DE.resources 
    
    %sdkpath%\resgen.exe ..\..\Excel\UIResources\ErrorMessages.de-DE.resx ..\..\Excel \UIResources\ErrorMessages_de-DE.resources 
    
    %sdkpath%\Al.exe /t:lib /embed:..\..\Excel\UIResources\RibbonRegion_de-DE.resources /culture:en-US /out:..\..\Excel\UIResources\RibbonRegion_de-DE.dll 
    
    %sdkpath%\Al.exe /t:lib /embed:..\..\Excel\UIResources\UIDialog_de-DE.resources /culture:en-US /out:..\..\Excel\UIResources\UIDialog_de-DE.dll 
    
    %sdkpath%\Al.exe /t:lib /embed:..\..\Excel\UIResources\ErrorMessages_de-DE.resources /culture:en-US /out:..\..\Excel\UIResources\ErrorMessages_de-DE.dll 
  6. Save the file, build and execute the project.
  7. In the build result, you can find the new German locale DLL as well as the previous English locale DLL.