Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/73.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Added directives hint for validation of the `default_language` field in languages control panel.
[sneridagh]
8 changes: 8 additions & 0 deletions plone/i18n/interfaces.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from plone.autoform import directives
from plone.supermodel import model
from zope import schema

Expand Down Expand Up @@ -37,6 +38,13 @@ class ILanguageSchema(Interface):
],
)

directives.widget(
"default_language",
vocabulary="plone.app.vocabularies.AvailableContentLanguages",
frontendOptions={
"format": "default_language",
},
)
default_language = schema.Choice(
title=_("heading_site_language", default="Site language"),
description=_(
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
python_requires=">=3.8",
install_requires=[
"setuptools",
"plone.autoform",
"plone.registry",
"plone.subrequest",
"plone.supermodel",
Expand Down