Closed marcus-at-localhost closed 9 months ago
Right not it isn't, but I agree that this should be provided. We will add it to our backlog.
For the time being I add language settings to each instance. https://codepen.io/localhorst/pen/KKwvKwB
let formioOptions = {
language: 'de',
i18n: {
de: {
'Edit': 'Bearbeiten',
'Preview': 'Vorschau',
'Save': 'Speichern',
'Cancel': 'Abbrechen',
'Remove': 'Entfernen',
'Close': 'Schließen',
'Move': 'Verschieben',
'Copy': 'Kopieren',
}
}
};
let builderOptions = _.merge({}, formioOptions, {
noDefaultSubmitButton: true
});
// initialize formio
var builder = new Formio.FormBuilder(document.getElementById('builder'), {}, builderOptions);
var onBuild = function(builder) {
Formio.createForm(document.getElementById('preview-form'), builder.form, formioOptions);
};
We're currently addressing a backlog of GitHub issues. Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!
I've setup Formbuilder similar to your example http://formio.github.io/formio.js/app/builder and I applied a translation in the options according to http://formio.github.io/formio.js/app/examples/language.html
it seems to work, but only partially when I open the model the first time [SAVE] is still english, the second time it's German. But other parts are translated right away.
Somehow it has to do with the second preview form
Is it possible to set that language globally over all
new Formio.*
instances?here is a codepen. https://codepen.io/localhorst/pen/BaaEBZz