Soluling home   Document home

Output Files

Output Files

A source is a file or database that you add to a Soluling project to localize it. It is also called the original file or original database. Soluling reads the sources and extracts the items to be translated. Once extracted, the items are visible in the project, and you can translate them. The opposite of reading is writing, where Soluling creates the localized output. Soluling never writes the localized items back to the original files, except in database localization. Instead, it creates copies of the original file in output directories. Each output file is like the original, except that the translated items have been replaced with the localized values.

There are four kinds of output files:

You create the output files by building the project. The Output File Names page explains how the names of the output files are formed.

Localized files

The simplest way to localize is to create a localized file for each language. For example, here is a simple XML file, Simple.xml:

<?xml version="1.0"?>
<simple>
  <product>Skim milk</product>
  <price>1.15</price>
</simple>

It contains one string, "Skim milk", that needs to be localized. If you add the file to a Soluling project, Soluling extracts "Skim milk" by default, so the project has one row. If you add Finnish to the project, enter the Finnish translation "Rasvaton maito", and choose Home | Build (or Build All), Soluling creates the following output file.

<?xml version="1.0"?>
<simple>
  <product>Rasvaton maito</product>
  <price>1.15</price>
</simple>

This is the Finnish version of Simple.xml, and it is created in a fi subdirectory. If the original file is C:\MyFiles\Simple.xml, the Finnish output file is by default C:\MyFiles\fi\Simple.xml. You can change the output directory and the file name on the Output sheet of the source dialog. See Output File Names.

Almost all sources create localized files, and if the original file does not contain several languages, localized files are the default output. Most sources support only localized files. Some sources also support multilingual or language files.

A Soluling Cloud build always creates localized files, which you download one language at a time. To create multilingual, language, or embedded files, build the project in Soluling Desktop or with SoluMake.

Multilingual file

Some file formats can store the same item in several languages. Such a file is a multilingual file. A multilingual Simple.xml looks like this:

<?xml version="1.0"?>
<simple>
  <product>Skim milk</product>
  <product xml:lang="fi">Rasvaton maito</product>
  <product xml:lang="de">Magermilch</product>
  <product xml:lang="ja">無脂肪乳</product>
  <price>1.15</price>
</simple>

The product element has been replicated in three languages: Finnish, German, and Japanese. Each copy has its language ID in the xml:lang attribute. The following file formats can store items in several languages:

Format Description
Android application file (.apk) The localized resources of all languages are written into one application file.
Delphi Selected resources, such as form and string resources, are written several times, once in each language.
Java archive (.jar) The localized resource files of all languages are added to one archive.
UWP app package (.appx) The localized resources of all languages are written into one package. This is the only output that the source supports.
Visual C++ Selected resources, such as dialogs, menus, and string resources, are written several times, once in each language.
XML The localized elements are replicated for each target language.
TMX The localized elements are replicated for each target language.
XLIFF One XLIFF file contains the translations of several target languages when the project has more than one.
Databases Localized rows are added, or localized fields or tables are populated.

On the Output sheet of these sources, you can choose what kind of output files are created.

Output sheet of an XML source

The above image shows a source where localized files are turned on and the multilingual file is turned off. You can turn on either one or both. If both are on, Soluling creates the localized files and one multilingual file. The multilingual file is created in the all subdirectory.

Language files

A language file is like a localized file, except that it does not contain all the data of the original file. It is a compiled, resource-only file for one language, and most often it contains only the resources that differ from the original resources. For example, Windows applications can use resource-only DLLs that contain the localized resources. You deploy the original executable (.exe) and a language file (.dll) for each language. The following file formats support language files:

Format Description
.NET The language files are DLL assembly files, often called satellite assembly files.
Delphi The language files are DLL files, often called resource DLL files.
Visual C++ The language files are DLL files, often called resource DLL files.

On the Output sheet of these sources, you can choose what kind of output files are created.

Output sheet of a Delphi source

Do not confuse language files with the resource files that almost all application platforms use. A resource file is a file that you create and edit when you write your software. For example, .rc is a resource source file of a Windows application, .dfm of a Delphi application, and .strings of an Xcode project. A language file is a compiled file that contains the localized resources of one language.

Embedded files

Language files give you extra flexibility. For example, you can set the initial language of your application, and you can even change the language at runtime (Delphi and C++Builder). However, you have several files to deploy. If you want to deploy just a single file, use the embedded files option. Soluling first creates the language files and then embeds them as a custom resource in your application file. When the application starts for the first time, it extracts the resource DLL files.

Format Description
Delphi Soluling embeds the resource DLLs in your application, and you call TNtBase.ExtractFiles to extract the resource DLL files.
Visual C++ Soluling embeds the resource DLLs in your application, but you have to write your own code to extract the resource DLL files.

On the Output sheet of these sources, you can choose what kind of output files are created.

Embedded output on the Output sheet of a Delphi source

When building, Soluling first creates the resource DLL files into the output directory, copies the original application file to the same output directory, and finally adds all resource DLL files inside the application file as a custom SOLULING resource. When the application starts for the first time, the Soluling code in your application extracts the resource DLL files and saves them on the disk. This makes it possible to make a single file deployment.