Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.28 KB

internationalization.adoc

File metadata and controls

36 lines (24 loc) · 1.28 KB

1. Internationalization (i18n)

1.1. Language of reports

DSS provides a module allowing changing a language for generated reports.

Note
Internationalization module supports translation of only validation process messages.

A target language of the report can be set with the following code:

Language customization
link:../../../test/java/eu/europa/esig/dss/cookbook/example/snippets/Snippets.java[role=include]

In case if no language is specified, the framework will use a default Locale obtained from OS on a running machine. If a requested language is not found, a default translation will be used.

As a default configuration DSS provides English translation.

In order to provide a custom translation, a new file must be created inside src\main\resources directory of your project with a name followed by one of the patterns:

dss-messages_XX.properties or dss-messages_XX_YY.properties, where:

  • XX - an abbreviation of a target language;

  • YY - a country code.

For example, for a French language a file with a name dss-messages_fr.properties should be created, or dss-messages_fr_FR.properties to use it only in France local.