Configuration properties

The following properties can be used in the application.properties or application.yml to configure the corresponding NILS-Adapter.

Property Explanation Adapter

nils.base-file-name

Value of the base file name.

  • JacksonAdapter

  • GsonAdapter

  • ResourceBundleAdapter

  • SnakeYamlAdapter

nils.class-prefix-resolver

Value to resolve the class prefix in a translation file.
See section nils.class-prefix-resolver for more information.

All

nils.date-format-style

Value used as default date format style.
See section nils.date-format-style for more information.

All

nils.escape-pattern

Value of the escape pattern of missing translations.

All

nils.fallback-active

Enable fallback to other translation resources.

All

nils.include-tag

Tag to include values from other translation keys.

All

nils.suppress-errors

Enable suppressing of errors.

All

nils.translatio-fFormatter

Value to resolve the TranslationFormatter.
See section nils.translation-formatter for more information.

All

nils.cache-timeout

Value for the cache timeout.

JDBC

nils.driver-class

Value of the database driver class.

JDBC

nils.key-field

Value of the key field in the database table.

JDBC

nils.locale-field

Value of the locale field in the database table.

JDBC

nils.url

Value of the database URL.

JDBC

nils.username

Value of the database user.

JDBC

nils.password

Value of the database password.

JDBC

nils.root-locale

Value of the root locale.

JDBC

nils.schema

Value of the database schema name.

JDBC

nils.table-name

Value of the database table name.

JDBC

nils.value-field

Value of the value field in the database table.

JDBC

See NILS documentation for more information about these configuration values.

nils.class-prefix-resolver

The value of the property nils.class-prefix-resolver can have one of the following values:

Value Explanation

fqn or FQN

Resolve the full qualified name from a class as prefix for the translation key.

simple or SIMPLE

Use the class name from a class as prefix for the translation key.

A full qualified class name

Create an instance of the given class name implementing the ClassPrefixResolver interface.

For more information about the ClassPrefixResolver see here.

nils.date-format-style

The value of the property nils.date-format-style can have one of the values from the enum java.time.format.FormatStyle.

For more information about the date format style see here.

nils.translation-formatter

The value of the property nils.translation-formatter can have one of the following values:

Value Explanation

message or MESSAGE

Use MessageFormat.format(…​) to replace arguments in a translation message.

string or STRING

Use `String.format(…​)ยด to replace arguments in a translation message.

A full qualified class name

Create an instance of the given class name implementing the TranslationFormatter interface.

For more information about the TranslationFormatter see here.