Closed tauinbox closed 5 years ago
The translation support in formio.js does not seem to be exposed through ng2-formio. The parameter for the i18n is not available in the ng2 version.
@travist any examples of this functioning with latest release?
We attempted this today, and while the json file of translations were loaded, the t()
function did not appear to get called.
This is next highest priority on my list. Just fixed issues with the CSS in the latest release. Will look at this next. I am passing the i18n variable along, but not sure why it isn't calling the translations.
@travist in your configuration, did you set it up so the form can change languages without having to reload the form/losing any data that was filled out by the user up to the point of the language change?
@travist @StephenOTT Exposing the new language
property of the internal Formio object, in the component, will make it possible to change languages without reloading the form.
Should be able to wrap this up today or tomorrow and get a new version released
Any news on this? Can't find any option to use a translation file
Is there any update on this. If possible, please share the example
This is now implemented. You pass it in using the [options]
parameter as options.i18n = {}
.
https://github.com/formio/angular-formio/blob/master/src/components/formio/formio.component.ts#L115
formio.js FormioForm renderer has an ability to use translation file given via option i18n https://github.com/formio/formio.js/wiki/Form-Renderer#options
That would be great if ng2-formio could pass it to there