DeployLX Software Protection System

How to Create a Custom Translation

With DeployLX Licensing provides custom translations for multiple cultures. When DeployLX Licensing compiles an error message or displays a form all text resources on are translated to the thread's CurrentUICulture.

How Does DeployLX Licensing Find a Custom Translation?

At runtime DeployLX uses the .NET Framework's built in resource management utilities to locate satellite assemblies that contain custom translations of the DeployLX Licensing resources. DeployLX will look at all the assemblies in the call chain starting from the host application to DeployLX.Licensing.v5.dll itself. For each assembly that it finds it will look for satellite assemblies with custom translations of the DeployLX Licensing resources. If found, any customized resources will be used. If no custom translation is found then the default resources will be used.

Satellite assemblies are placed into their own folder with the a name corresponding to the culture that it provides resources for. For example a satellite assembly for the es culture will go in to a subfolder named es.

Creating Your Own Translation

Use the RESX Translator to automatically translate the resouces into any of the 37+ langauges supported by

Download RESX Translator

Translation Project

The easiest way to create a custom translation is to to create a new Translation Project in DeployLX Manager. The Translation Editor provides an easy to use visual tool for editing the resources and automatically builds the satellite assemblies needed by the runtime to locate the custom translations.

Direct RESX Editing If you use satellite assemblies for your own resources then you must compile the custom translations into your satellite assemblies by including the translated RESX files into your project.

To create a Translation Project

  1. Start the DeployLX Manager.
  2. Open the Application Menu and select New | Translation Project.
  3. You will be prompted for a RESX file to customize. Navigate to the Redistributables folder located in the DeployLX installation folder. Select DeployLX.Licensing.v5.resx and select OK.
  4. Add a new culture by selecting the New Culture icon on the Translate Tab.
  5. Select the collection of resources you would like to edit from the Resources Tree.
  6. The main resource window lists all the resources that can be customized. Make any desired changes to the list and select Save.
  7. Select Options to select the target protected assembly and strong name keys for that assembly.
  8. Select the target assembly that is protected by DeployLX Licensing and Select OK to close the options.
  9. Select Build on the Translate Tab to generate the satellite assemblies.

To edit custom RESX files

In order for DeployLX to find the custom translation you must also add the neutral culture DeployLX.Licensing.v5.resx to the protected assembly.

  1. Open your protected project in Visual Studio .NET.
  2. Create a new folder named Resources.
  3. Right click on the newly created Resources folder and select Add | Existing Item.
  4. Navigate to the Redistributables folder located in the DeployLX installation folder and select the DeployLX.Licensing.v5.resx file.
  5. Rename the resource using the ISO two or four letter culture name. For example to support the es-MX culture the file name should be
  6. Open the RESX file in Visual Studio .NET and translate all the desired resources.
  7. Compile your project.
  8. Repeat steps 3-6 for each additional culture you want to support.
  9. Repeat step 4 to ensure the neutral culture is always added to your assembly.

As an alternative to editing the RESX files in Visual Studio you can use the Translation Project described above and export the resulting RESX files directly to the Resources folder of your project1.

Testing a Translation

If you do not use a localized version of Windows you won't see your custom translation automatically. To manually test a translation set the thread's CurrentUICulture before calling LicenseManager.Validate.

This sample assumes that a custom translation has been provided for the es neutral or es-MX specific culture.

Thread.CurrentThread.CurrentUICulture = _ 
_license = SecureLicenseManager.Validate(Me, Nothing, Nothing)
Thread.CurrentThread.CurrentUICulture = 
  		CultureInfo.GetCultureInfo( "es-MX" );
_license = SecureLicenseManager.Validate( this, null, null );

See Also