January 16, 2019
by Tibor Lorántfy
modified at January 21, 2019

How to Create Multi-Language Add-On

Content

  1. Windows platform
  2. macOS platform
  3. Name of Add-Ons folder in different Language versions of ARCHICAD

Windows platform

Introduction

Before ARCHICAD 22 an ARCHICAD Add-On was a single “.apx” executable file which contained both executable code and resources. That prevented to create multi-language Add-Ons, the Add-On developers have to build separate Add-On files for each language.

Now on Windows platform MUI Resource Technology have been introduced into ARCHICAD 22 which is available for Add-On developers too. The usage of this resource technology is not obligatory.

Overview

The basic benefit of MUI Resource Technology is the separation of the executable code and language neutral resources from the language specific resources.

The language specific resources are separated to a file with “.mui” extension. This file should be placed in a folder with the name of an appropriate language ID and this folder should be located next to the belonging language neutral executable file.

The language specific “.mui” files are handled and loaded by the system automatically. The loaded language depends on the system and User settings.

For more details please visit:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd319070(v=vs.85).aspx

Build

There are two ways to achieve the separation during the build process:

  • by using the muirct tool on the final executable binary to split it afterwards
  • by using the resource compiler to split the resources before the linkage of the final binaries

For more details please visit:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd319113(v=vs.85).aspx

The split is driven by the resource configuration xml file in both cases.

For more details please visit:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd319100(v=vs.85).aspx

Example

In the API DevKit you will find one example (DG_Test) on how to build the Add-On to achieve the result corresponding to the MUI resource technology.

In this example the split is made by the muirct tool just after the build process. The split is driven by the rc.config xml file, which you will find in the RINT folder.

In the Visual Studio project file you will find new PreLink, PreBuild and PostBuild commands which are responsible for the desired result:

  • The PreLink action creates the output folder named “en-US” if it is not present.
  • The PreBuildEvent script will delete the “.apx” file created during a previous build
  • The PostBuildEvent script will create the “.apx.mui” file if it does not exists or it is older than the “.apx” file. The mui creation is done by muirct.exe, which creates a language neutral “.apx” file and a localized “.apx.mui” file.

Additional information:

  • The easiest way to view or edit these events is by opening the Visual Studio project file in a text editor.
  • If you are compiling your code to other language than English, you will have to change the output folder name from “en-US” to the appropriate one.
  • You will have to edit the rc.config file in a text editor, and change it for your own purposes.
    • You have to change the checksum, if your newly build Add-On is not able to use the resources in the previously shipped “.apx.mui” file. This usually happens, if your change in the code affects some localized resources.
    • Language parameter in the rc.config file should be the same as the output folder name for the mui file set in the Visual Studio Project file.
    • In the rc.config file you can list resource types or resource types with resource identifiers. In the first case all the resources of the given type will be moved to the “.apx.mui” file, in the second case only the resources with the given identifiers are going to be moved.

Note

MUI resource technology uses the ultimate fallback language which by recommendation of Microsoft always should be deployed with the distributed package.

For more details please visit:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd374098(v=vs.85).aspx

Despite the ultimate fallback language for ARCHICAD is set to “en-US”, we are only deploying the language resource files corresponding to the ARCHICAD’s language version.

macOS platform

Introduction

Coming soon…

Name of Add-Ons folder in different Language versions of ARCHICAD

The following table contains the name of the Add-Ons folder in different language versions of ARCHICAD:

AUSAdd-Ons
AUTAdd-Ons
BRAExtensões
CHEAdd-Ons
CHIAdd-Ons
CZEDoplnky ArchiCADu
DENAdd-Ons
FINArchiCAD-laajennukset
FRAExtensions
GERAdd-Ons
GREAdd-Ons
HUNKiegészítök
INTAdd-Ons
ITAAdd-Ons
JPNAdd-Ons
KOR애드온
NEDAdd-Ons
NORAdd-Ons
NZEAdd-Ons
POLDodatki
PORExtensões
RUSРасширения ArchiCAD
SPAExtensiones ArchiCAD
SWEAdd-Ons
TAIAdd-Ons
TURAdd-On’lar
USAAdd-Ons

 

There is a second way to determine the name of the Add-Ons folder: search for the XReadCfg.txt file. The folder which contains that file will be the Add-Ons folder in all language versions.