diff --git a/CHANGELOG b/CHANGELOG
index c82f9ee11..998d300c7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -15,6 +15,7 @@ Agenda:
Core:
- Added support for multiple projectors.
- Added control for the resolution of the projectors.
+- Set the projector language in the settings.
- Used pdfMake for clientside generation of PDFs.
- Introduced new table design for list views with serveral filters and
CSV export.
diff --git a/openslides/core/config_variables.py b/openslides/core/config_variables.py
index a84a0f7fc..2b68b8017 100644
--- a/openslides/core/config_variables.py
+++ b/openslides/core/config_variables.py
@@ -107,6 +107,22 @@ def get_config_variables():
# Projector
+ yield ConfigVariable(
+ name='projector_language',
+ default_value='browser',
+ input_type='choice',
+ label='Projector language',
+ choices=(
+ {'value': 'browser', 'display_name': 'Current browser language'},
+ {'value': 'en', 'display_name': 'English'},
+ {'value': 'de', 'display_name': 'Deutsch'},
+ {'value': 'fr', 'display_name': 'Français'},
+ {'value': 'es', 'display_name': 'Español'},
+ {'value': 'pt', 'display_name': 'Português'},
+ {'value': 'cs', 'display_name': 'Čeština'}),
+ weight=148,
+ group='Projector')
+
yield ConfigVariable(
name='projector_enable_logo',
default_value=True,
diff --git a/openslides/core/static/js/core/projector.js b/openslides/core/static/js/core/projector.js
index 65460a31c..4e7bbb61d 100644
--- a/openslides/core/static/js/core/projector.js
+++ b/openslides/core/static/js/core/projector.js
@@ -56,6 +56,29 @@ angular.module('OpenSlidesApp.core.projector', ['OpenSlidesApp.core'])
}
])
+.controller('LanguageCtrl', [
+ '$scope',
+ 'Languages',
+ 'Config',
+ 'ProjectorID',
+ function ($scope, Languages, Config, ProjectorID) {
+ // for the dynamic title
+ $scope.projectorId = ProjectorID();
+
+ $scope.$watch(function () {
+ return Config.lastModified('projector_language');
+ }, function () {
+ var lang = Config.get('projector_language');
+ if (!lang || lang.value == 'browser') {
+ $scope.selectedLanguage = Languages.getBrowserLanguage();
+ } else {
+ $scope.selectedLanguage = lang.value;
+ }
+ Languages.setCurrentLanguage($scope.selectedLanguage);
+ });
+ }
+])
+
// Projector Container Controller
.controller('ProjectorContainerCtrl', [
'$scope',
@@ -63,11 +86,8 @@ angular.module('OpenSlidesApp.core.projector', ['OpenSlidesApp.core'])
'gettext',
'loadGlobalData',
'Projector',
- 'ProjectorID',
- function($scope, $location, gettext, loadGlobalData, Projector, ProjectorID) {
+ function($scope, $location, gettext, loadGlobalData, Projector) {
loadGlobalData();
-
- $scope.projectorId = ProjectorID();
$scope.error = '';
// watch for changes in Projector
diff --git a/openslides/core/static/js/core/site.js b/openslides/core/static/js/core/site.js
index e0b1a33a8..174ec4e75 100644
--- a/openslides/core/static/js/core/site.js
+++ b/openslides/core/static/js/core/site.js
@@ -1436,6 +1436,8 @@ angular.module('OpenSlidesApp.core.site', [
'"static/img/logo-projector.png" in your OpenSlides data ' +
'path.');
gettext('Projector');
+ gettext('Projector language');
+ gettext('Current browser language');
gettext('Show title and description of event on projector');
gettext('Background color of projector header and footer');
gettext('Font color of projector header and footer');
diff --git a/openslides/core/static/templates/projector-container.html b/openslides/core/static/templates/projector-container.html
index 6a9baa1c5..091b766a6 100644
--- a/openslides/core/static/templates/projector-container.html
+++ b/openslides/core/static/templates/projector-container.html
@@ -1,5 +1,5 @@
-
+