Internationalization / Localization

Starting with Wrapper version 3.5.0, the code base has been internationalized and is able to run localized. Initially the available languages are English, German and Japanese, but we hope to provide gradually more and more localizations.

Localization Files

The Wrapper will load the Localizations file on startup, depending on the language of the OS. It is also possible to load a language explicitly specified in the wrapper.lang property. If the Wrapper is not supporting a language, i.e. the localization files were not found, the Wrapper will try to fall back, first, to the OS language, if this is also is failing, subsequently it will fall back to English.

In order to be able to run the Wrapper fully localized 2 resource files are necessary: The files are located in the [wrapper]\lang directory.

  • "wrapper_XX.mo" file:

    this file contains the localized messages of the Wrapper binary (e.g. wrapper.exe)

  • "wrapperjni_XX.mo" file:

    this file contains the localized messages of the Wrapper library (e.g. wrapper.dll) and the Java API of the Wrapper (e.g. wrapper.jar)

The "XX" in the filenames is the abbreviation for the language (possible values for example en, ja, de, etc.).

"wrapperTestApp_XX.mo" file:

Besides the wrapper_XX and wrapperjni_XX resource files, you might notice that there is a 3rd mo file called wrapperTestApp_XX.mo. This file contains the localized messages for the TestWrapper Example Application & DemoApp Application. This file is not necessary if you are running your own Applications with the Wrapper, and therefore is safe to remove on deploy. The TestWrapper & DemoApp applications make use of the WrapperResources class. This API is public and can be used for any Java Application. For more information on how to use the Wrapper to localize your Java Application, please have a look at "Localization API" page.

NOTE

Since Wrapper version 3.5.38, the Wrapper will silently continue if a mo file was not found in the specified lang directory. This is done to allow the user skipping localization by simply removing the undesired language files. One may also want to localize only the Java application messages, or only the Wrapper messages, by keeping the appropriate language files.

Encode in Configuration Files

The Wrapper reads the configuration file using the encoding declared on the first line of the file. When using non-ASCII characters, please make sure that they are supported by the specified character set. It is advised to use UTF-8, which supports a wide range of characters of different localizations.

Example: (Setting the configuration file encoding to UTF-8)
#encoding=UTF-8
# Configuration files must begin with a line specifying the encoding
#  of the file.

So far the supported encodings for the configuration file are:

NOTE

If the #encoding header has not been defined, the Wrapper will not try to convert any characters and read the configuration file in the current system encoding, the Wrapper is being run.