[Solved] How to set language preferences from registry.xml?

From my registry.xml file (included in my policy add-on), I can set most of the settings in /@@language-controlpanel, but not the default language and the available languages.

What would be the proper way to set all language preferences from registry.xml (or some other .xml file), to avoid using a python script?

Go to the "Control Panel" and there to the "Configuration Registry". Then choose the tab "Export" and click the " plone.i18n.interfaces.ILanguageSchema" link.

You got an XMLfile for download.

Place this file in your profile/default/registry folder (create it if missing).

Now, next time you install the profile, the language settings are restored as been set in UI.

Of course! :man_facepalming:
It's trivial, I did the same a while ago, thanks for the reminder (hopefully it'll help someone else too).

Slightly off topic, but:

For everything that can be installed in profiles/something.xml: The same can usually be exported from /portal_setup (export).

SO, if you don't know the syntax, do it TTW, export the settings and copy/paste them to your profile.

1 Like

Plone Foundation Code of Conduct