Localizing Orbeon Forms
Introduction
This document explains how to localize Orbeon Forms (i18n/L10n).
See also Supported Languages.
Files to localize
Form Runner and Form Builder resources
See these 2 files:
Each file has as series of <resource>
elements each with an xml:lang
attribute. You need to add your own element. Say you want to localize to Italian:
You can start by copying an existing <resource>
element (for example French).
Starting 2014-03-21, we are marking placeholder resources for existing languages with todo="true"
.
NOTE: You must not translate the <value>
part of item definitions, for example:
For Form Builder, starting with Orbeon Forms 4.0, you also need to update the following property in your properties-local.xml
:
By default, Orbeon Forms 4.0 sets it to en fr
. The updated property at least needs to include the new language or languages that you are adding, in this case, it
. For more details on this, see this Stack Overflow question.
Calendar resources
See CalendarResources.js
.
Similar idea here, but this is in JavaScript, for client-side calendar support.
XBL components
Orbeon Forms XBL components are located as subdirectories here:;
https://github.com/orbeon/orbeon-forms/tree/master/form-runner/jvm/src/main/resources/xbl/orbeon
Each subdirectory has a .xbl file with some metadata. For example:
As of Orbeon Forms 2016.1, the following controls need help:
handwritten-signature.xbl (link needs authorization)
In there, you will notice the localization in English, French, etc. Add your own language.
To get started search for the English version in all files for both:
lang="en"
xml:lang="en"
Then add the corresponding resources for the new language.
NOTE: Makes sure also to localize dialog-select-resources.xml
, which is easily missed.
Pseudo-XBL components
https://github.com/orbeon/orbeon-forms/blob/master/form-builder/jvm/src/main/resources/forms/orbeon/builder/xbl
These files are used by the Form Builder toolbox for built-in XForms controls.
As of Orbeon Forms 2018.2, the following files need help:
UNTIL Orbeon Forms 2018.1
SINCE Orbeon Forms 2018.2
TODO: more files,
Dates and times
For formatting of dates and times, a Java class usually needs to be added. See the example for Norwegian:
How to localize
You can go about this in various ways.
Localize the files
Send them to us
with a github pull request
by sending the files to us separately
Either way, we need the CLA signed.
But you will want to see the results yourself first. Here you can either work with
the source from github
or a binary build
If working with the source, build Orbeon Forms, localize the files, and test as you go.
If working with a binary build, you can override built-in files by creating your own files under the WAR file's WEB-INF/resources directory:
WEB-INF/resources/apps/fr/i18n/resources.xml
WEB-INF/resources/forms/orbeon/builder/form/resources.xml
WEB-INF/resources/ops/javascript/orbeon/xforms/control/CalendarResources.js
WEB-INF/resources/xbl/orbeon/*/*.xbl
WEB-INF/resources/forms/orbeon/builder/xbl/*/*.xbl
See also
Last updated