formio / angular

JSON powered forms for Angular
https://formio.github.io/angular-demo
MIT License
615 stars 462 forks source link

How to apply translations to Form Builder #929

Closed hem1232 closed 1 week ago

hem1232 commented 1 year ago

How to apply translations to Form Builder??

ZenMasterJacob20011 commented 1 week ago

In order to have translations in the form builder, you need to pass in the i18n property to the form builder options. The schema would look like the following...

Formio.builder(document.getElementById("id to builder"), {}, {
i18n: {
    en: {
        "Text to translate": "Translated Text"
    }
}
})

Here is an example in jsfiddle: https://jsfiddle.net/ZENMASTER2001/024bcLxh/6/

More information about translations can be found at https://help.form.io/developers/form-development/translations#rendering-translations