World Map
Java Service Wrapper is the easiest way to make your product more reliable.
  • Free Trial
  • Buy Now
Internationalization/Localization Language Properties

Internationalization/Localization Language Properties

Starting with Wrapper version 3.5.0, the code base has been internationalized and is able to run localized. To run your application in another language (given that your OS supports the language), please read through this page.

NOTE

Changes to the value of these properties will not have any affect on the Wrapper if the configuration is reloaded. The Wrapper must be restarted for changes to take effect.

wrapper.lang

Compatibility :3.5.0
Editions :Professional EditionStandard EditionCommunity Edition (Not Supported)
Platforms :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

This property specifies the output language of the Wrapper. Please note that on UNIX based systems, this value has to be the valid part 'language[_territory]' of an installed locale.

In order to get the installed and available locales on an UNIX system, please run "locale -a"

Example: (set the language to Japanese)
$ locale -a
C
de_AT.utf8
de_BE.utf8
de_CH.utf8
de_DE.utf8
de_DE@euro
de_DE.iso885915@euro
de_LI.utf8
de_LU.utf8
en_AG
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NG
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8
ja_JP.eucjp
ja_JP.shiftjis
ja_JP.utf8
POSIX

NOTE

If no locale for the desired language appears in the list, you would need to install one prior to using the localization feature of the Wrapper. On Linux, this can be done with the 'locale-gen' command.

The values 'ja_JP', 'en_US', 'en_UK' and 'de_DE' are also supported on Windows.

You only need to set the 'language[_territory]' part for this property. The encoding will be set in the wrapper.lang.encoding property.

Example: (set the language to Japanese)
wrapper.lang=ja_JP

Starting with Wrapper version 3.5.28, the wrapper.lang property can also be set with the following values:

  • DESKTOP specifies that the language of the Wrapper will be resolved according to the UI language.
  • SYSTEM cause to use the system language (commonly referred to as 'Language for non-unicode programs').

On UNIX based operating systems, both DESKTOP and SYSTEM are ignored just like when the property is not set. In these cases, the Wrapper will simply use the locale of the parent process.

On Windows, the default value is DESKTOP. Prior to version 3.5.28, the language was resolved using the language identifier of the Region Format settings.

Since version 3.5.31, the Wrapper improves portability by being more flexible when resolving and setting a locale defined in the configuration:

  • If no exact match could be found, the Wrapper will search for a locale with a lang and country code in a different case (for example 'JA_JP' instead of 'ja_JP'). It is however recommended to set the value with the same case as it appears on your terminal when using 'locale -a'.

  • It is also possible to specify a modifier (e.g., @euro) after the language. If wrapper.lang.encoding is also set, the modifier will be automatically added after the encoding when setting the locale. Usually it should not be needed to add the modifier because the Wrapper also searches among locales ignoring the modifiers if no exact match could be found.

wrapper.lang.encoding

Compatibility :3.5.0
Editions :Professional EditionStandard EditionCommunity Edition (Not Supported)
Platforms :Windows (Not Supported)Mac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

This property specifies the encoding of the Wrapper process. The selected encoding has to be installed in order to make use of it. If the combination of language and encoding doesn't exist in any of the installed locales, the Wrapper tries to use the encoding of the console, which launched the Wrapper.

Example: (set the encoding to eucJP)
wrapper.lang.encoding=eucJP

If you use the command 'locale -a' to list all installed locales of the system, you may notice that some of them have no encoding specified in their descriptive name. In fact, such locales have a default encoding which can be displayed by using the following command:

Example: (display the default encoding)
$ LANG=de_DE@euro locale charmap
ISO-8859-15

In order to make the Wrapper use a locale with a default encoding, it is necessary to set wrapper.lang.encoding to the value of the default encoding.

Example: (define a locale with its default encoding)
wrapper.lang=de_DE@euro
wrapper.lang.encoding=ISO-8859-15

NOTE

On some platforms you would need to change the locale before executing 'locale charmap'.

On Mac OSX, 'locale charmap' will return an empty string when querying the default encoding of a locale. In this case, the encoding is assumed to be UTF-8.

NOTE

When setting a locale, some platforms (Linux, AIX) will ignore canonical dashes, punctuation, and case in the encoding notation. For example UTF-8 is equivalent to utf8. Other platforms will require the encodings to strictly match (Solaris, FreeBSD, HP-UX). Finally some platforms will require the dashes and punctuation to match but not necessarily the case (Mac OSX, ZOS).

WARNING

In order to properly display log outputs, the configured encoding must match with the terminal's encoding. There is no way for the Wrapper to know about the terminal encoding, as it is usually specified by an option of the terminal emulator and not by a locale variable. For example, the encoding of the Gnome terminal can be changed from the menu by selecting: Terminal -> Set Character Encoding.

wrapper.lang.folder

Compatibility :3.5.0
Editions :Professional EditionStandard EditionCommunity Edition (Not Supported)
Platforms :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

This property sets the location of the language files. The default value is "../lang".

Example: (Change the location of the language files)
wrapper.lang.folder=lang

Please note that relative pathes are relative to the location of the Wrapper binary, not the location from where the command has been launched nor the location of the configuration file.

wrapper.lang.domain

Compatibility :3.5.0
Editions :Professional EditionStandard EditionCommunity Edition (Not Supported)
Platforms :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

This property sets the domain of the binary and the library mo files. If you want to rename the wrapper_XX.mo and wrapperjni_XX.mo file, you need to set this property accordingly.

Example: (change the domain)
wrapper.lang.domain=myapp

This will cause the Wrapper to look for myapp_XX.mo or myappjni_XX.mo file when loading the language resources.