forked from External/greenlight
		
	Added env variable to set the default language (#2147)
This commit is contained in:
		@@ -101,7 +101,7 @@ class ApplicationController < ActionController::Base
 | 
				
			|||||||
    locale = if user && user.language != 'default'
 | 
					    locale = if user && user.language != 'default'
 | 
				
			||||||
      user.language
 | 
					      user.language
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      http_accept_language.language_region_compatible_from(I18n.available_locales)
 | 
					      Rails.configuration.default_locale.presence || http_accept_language.language_region_compatible_from(I18n.available_locales)
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -131,6 +131,9 @@ module Greenlight
 | 
				
			|||||||
    # File types allowed in preupload presentation
 | 
					    # File types allowed in preupload presentation
 | 
				
			||||||
    config.allowed_file_types = ".doc,.docx,.ppt,.pptx,.pdf,.xls,.xlsx,.txt,.rtf,.odt,.ods,.odp,.odg,.odc,.odi,.jpg,.jpeg,.png"
 | 
					    config.allowed_file_types = ".doc,.docx,.ppt,.pptx,.pdf,.xls,.xlsx,.txt,.rtf,.odt,.ods,.odp,.odg,.odc,.odi,.jpg,.jpeg,.png"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Default locale
 | 
				
			||||||
 | 
					    config.default_locale = ENV["DEFAULT_LOCALE"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # DEFAULTS
 | 
					    # DEFAULTS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Default branding image if the user does not specify one
 | 
					    # Default branding image if the user does not specify one
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -201,6 +201,15 @@ MAINTENANCE_WINDOW=
 | 
				
			|||||||
# Button can be disabled by setting the value to blank
 | 
					# Button can be disabled by setting the value to blank
 | 
				
			||||||
HELP_URL=https://docs.bigbluebutton.org/greenlight/gl-overview.html
 | 
					HELP_URL=https://docs.bigbluebutton.org/greenlight/gl-overview.html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Change the default language
 | 
				
			||||||
 | 
					# 
 | 
				
			||||||
 | 
					# By default, Greenlight will appear in the same language as that specific user's browser. 
 | 
				
			||||||
 | 
					# The user can override this by going into their profile and changing the language.
 | 
				
			||||||
 | 
					# You can override the default language to a specific language instead of the browser's language by setting
 | 
				
			||||||
 | 
					# the variable below. To find the correct value, visit: https://github.com/bigbluebutton/greenlight/tree/v2/config/locales
 | 
				
			||||||
 | 
					# and find the code that matches the language you want. Ex: For Arabic -> DEFAULT_LOCALE=ar, For Italian -> DEFAULT_LOCALE=it
 | 
				
			||||||
 | 
					# DEFAULT_LOCALE=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Force a redirect to HTTPS and make cookies secure. 
 | 
					# Force a redirect to HTTPS and make cookies secure. 
 | 
				
			||||||
# WARNING: Only set this to false for a development environment. 
 | 
					# WARNING: Only set this to false for a development environment. 
 | 
				
			||||||
ENABLE_SSL=true
 | 
					ENABLE_SSL=true
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user