Closed basharmsen closed 3 years ago
The format of the template files is changed for this issue. In the template files the values of the following fields
title
and description
of a templatestringFormat
title
and description
for all template itemsshall now be specified using the following format:
<???>
<txt lang="???">???</txt>
<txt lang="???">???</txt>
<???>
For Example:
<title>
<txt lang="nl">Complicatie van lichaamsstructuur</txt>
<txt lang="en">Complication of body structure</txt>
</title>
I've added a defaultLang
-attribute to the <template>
-elements. The value of this attribute is used as the default language when a template is not available in the requested language. The title of a template and the titles of the items shall have a non-empty txt
-child for the default language to ensure that these fields are available for the default language.
I've added an url parameter lang
to the operations /Templates
an Templates/
TemplateId to specify the preferred language. For each template in the results the service checks if the template is available for the preferred language. When a template is not available for the preferred language then its default language is used.
The results of the template service now also include the fields currentLanguage
and supportedLanguages
. currentLanguage
is the language that is used for the template in the current response (as described above this can be different from the requested language). A language is included in the array supportedLanguages
when all required fields (the title of the template and the title for each item) are specified for this language.
The tags are now defined in a central file tags.xml in the templates directory. The tag
-elements in tags.xml
use the same format as described above. The tags have their own default language to prevent that the same tag has different translations in a result of the /Templates
operation. This default language is specified in the defaultLang
-attribute of the root of tags.xml
. Just as with the titles in a template, a translation for the default language must be specified for all tags.
The tag
-elements in the templates are now empty but they have an id
-attribute instead. These refer to the id
-attributes of the tags in tags.xml
.
I've added an XML Schema for the tags.xml
file and adapted the XML Schema for the templates.
This XSLT-stylesheet can be useful when converting templates: ConvertTemplate.zip
The parser service should support multiple languages for