Assets - i18n (internationalisation) properties files

The I18n properties files asset is one of the types of content that can comprise a BRJS application. There is more information about assets on About Bundlers.

Each i18n file is a standard Java properties file, and contains label values appropriate for a particular locale.

For example:

The file en_GB.properties might contain the following definition for a greeting:

novotrader.welcome=Hello

Whilst the file fr_FR.properties would contain:

novotrader.welcome=Bonjour

The browser will request all labels for a particular locale. In most circumstances, the i18n bundler only loads the properties files appropriate for the requested locale. When a deployable application is being generated however, a separate i18n bundle will be generated for every locale for which properties files exist. The localised labels are sent to the browser as a single JSON map of key/label pairs.

The i18n bundler enforces a namespacing convention, which ensures that someone working in a blade cannot accidentally overwrite a label in another blade. An error is reported if a template violates the namespacing convention. The bundler verifies that the label identifier key follows the namespacing convention.

For example:

novotrader.fx.tile.execute=Execute Trade

In this example, the properties file must reside in a blade for which the app name is novotrader; the bladeset name is fx, and the blade is called tile.