Translation Module

Overview

This module is used for registering new translation resources (aka "properties" files). For more information about translation resources see Localization definition.

Module's schema is defined in localization.xsd.

Attributes

name

type

required

description

path

string

yes

Path to the directory which contains resources.
This is a relative path from src/main/resources/pluginIdentifier.

basename

string

no

Basename of the file (name without locale and extension).
For example basename of the file "messages_en.properties" is "messages".
If not specified all files under given path will be taken.

Example

Please find below an example of plugin defining one translation module. Lines 8 contains a module which register resources matching src/main/resources/sampleDictionary/locales/sample_*.properties.

<?xml version="1.0" encoding="UTF-8"?>
<plugin plugin="samplePlugin" version="1.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns="http://schema.qcadoo.org/plugin" 
    xmlns:localization="http://schema.qcadoo.org/modules/localization" 
    xsi:schemaLocation="http://schema.qcadoo.org/plugin http://schema.qcadoo.org/plugin.xsd http://schema.qcadoo.org/modules/localization http://schema.qcadoo.org/modules/localization.xsd">

    <localization:translation path="locales" basename="sample" />

</plugin>