Skip to content

Translate

Belim edited this page Sep 22, 2020 · 32 revisions

Table of Contents

How-to translate Privatezilla

Download source code

Download the latest version of the Privatezilla source code.

No reason to panic! The translation does not require any programming skills but is necessary to extract the translation resources and strings.

Download translation tool

No we need to download a Resource translation tool. I recommend the open source Resource Translator Tool.

This is a tool for non-developers to quickly translate resource files (resx) in .NET projects to multiple languages in parallel.

You could also use a Localization Management Platform such as Crowdin for the translation. The translation is provided in .XML format and the Resources.resx file must be translated. In this case, you don't need the whole source code and only the Locale.resx .XML-file.

Usage guidelines of translation tool

Launch the ResxTranslator.exe, go to the File/Open directory options and browse to the Privatezilla src folder (basically where the SLN file is located). The tool will now iterate thru all sub folders and look for resx files. (Note that it's not using the SLN or project files, it's just looking for files with file extension resx).

The left panel will now show a tree view of all found resources. You open a resource by double clicking the tree node. You will then see all resource strings in that file in the right part of the screen.

Once you have translated all strings, go to File and Export all resources. Please add also a language code, e.g. for the German language de should be used.


You can put some translation credits (name, website, mail, about you etc.) in string infoApp.

Upload translation file

You can send me the exported file by opening a new GitHub Issue or via a new Pull request.

Compiling the language resources (Advanced)

Experienced users can of course import the Resources.resx file into the source code by themselves. You will need to recompile Privatezilla to create the language resource.

What resource is used depends on Thread.CurrentThread.CurrentUICulture. It is set depending on Windows UI language setting. You can add country-specific resources like strings.de.resx or strings.fr-Fr.resx.

The string to be used is determined in this priority order:

  1. From country-specific resource like strings.fr-Fr.resx
  2. From language-specific resource like strings.fr.resx
  3. From default strings.resx
After compiling and generating the resources file, e.g. de a new folder with the name of the language resource is generated in the bin directory of Privatezilla.


Localization is only supported by Privatezilla version 0.40 and higher!