Advanced integration - Localization
Localization is managed at three levels:
- the
localeoption is passed to the components that can use it (notably the date-picker) - the
messagesoption is initialized with localized contents in one of the supported languages - the
formatsoption is initialized with formatting methods (date, etc.) that receive a locale as second parameter
Internationalization of the contents of the schemas (titles and descriptions) falls mostly outside the scope of this library.
You should probably use some preprocessing on the schema before passing it to Vjsf.
A possible solution is to use json refs that point to a dynamically modified section of the schema based on current locale.
As a convenience Vjsf replaces the string ~$locale~ with the current locale in all the refs it resolves, so that you can use something like this "title": {"$ref": "#/i18n/~$locale~/mytitle"} which is a limited solution to the problem.