iPaper 2 – Hinzufügen und Bearbeiten neue Sprachen und Übersetzungen

Das iPaper 2 Userinterface ist multilinual ausgelegt – d.h. es können neue Sprachversionen hizugefügt und ergänzt werden. Standardmäßig sind die Sprachen English und Deutsch vorhanden.

Zur Übersetzung haben wir ein Tool entwickelt um die Ressourcen Dateien (RESX – XML Dateien) zu erzeugen und zu bearbeiten. Die RESX Dateien kann man jedoch nicht direkt verwenden – diese müssen erst in DLL´s verpackt und konvertiert werden.

With the tool we wrote – Translation.NET – it is possible to create resx files with other languages. That tool can easy used to translate the files but you can also send us the resx files, then we include them to the setup.

There is another solution, using WinRes to translate the satellite assemblies, but to use that tool the NET Framework SDK should be installed on the workstation. There are some problems:

  • The translated resource may also contain the changed position of a control.
  • New controls will not be translated, because the customer uses an old version of the satellite assemblies.

With the WinRes it is also possible to change the layout of the windows. But the resgen.exe and al.exe should be called to generate satellite assemblies.

The solution with the satellite assemblies should be applied when the application is completely ready, no more changes will be on the UI (or very few changes).

The NET Framework SDK is free of charge.

There is also a simple way.

  • Translate the resx files with our tool
  • Create .resources file from the resx files
  • Compile the .resources file to .resources.dll (satellite assembly)

There are 2 NET tools, one generates .resources file from .resx and the another combines the .resources file to one (or more) satellite assembly.

The commands/tools are:
„%ProgramFiles%\Microsoft SDKs\Windows\v6.0A\Bin\ResGen.exe“ „D:\Programe May.NET\Translation Example\MainApplication\Form1.de-DE.resx“ „D:\Programe May.NET\Translation Example\MainApplication\MainApplication.Form1.de-DE.resources“

„%ProgramFiles%\Microsoft SDKs\Windows\v6.0A\Bin\al.exe“ /t:lib /culture:de-DE /out:“D:\Programe May.NET\Translation Example\MainApplication\bin\Debug\de-DE\MainApplication.resources.dll“ /embed:“D:\Programe May.NET\Translation Example\MainApplication\MainApplication.Form1.de-DE.resources“

The input file for the resgen is the Form1.de-DE.resx – this file can be created easily with the Translation.NET application.

The output after resgen.exe is the MainApplication.Form1.de-DE.resources

Using the al.exe (assembly linker) the MainApplication.Form1.de-DE.resources is embedded in a satellite assembly MainApplication.resources.dll.

The satellite assemblies should be copied in a subfolder of the application installation file. The subfolder name should be the same as specified in the /culture parameter, in our case de-DE

So the installation folder should look like:
MainApplication.exe
de-DE\MainApplication.resources.dll (the german resources)
it-IT\MainApplication.resources.dll (the italian resources)

Download Translation Example from here >>>

you will find a sample application and command file (createResources.cmd) which does these steps.

Another problem can be the deployment of these files. Under Windows Vista and Windows 7 (and also on XP with the latest updates) there is no possibility to write / copy files to the %ProgramFiles% folder, how you can deploy these files ? A solution would be to create a setup for these files and install it in the iPaper.NET application installation directory as subfolders.

Webshop