Merge pull request #4287 from Takuto88/language-config
Make default language configurable via config.php
This commit is contained in:
commit
821a99b937
|
@ -56,6 +56,9 @@ $CONFIG = array(
|
|||
/* Theme to use for ownCloud */
|
||||
"theme" => "",
|
||||
|
||||
/* Optional ownCloud default language - overrides automatic language detection on public pages like login or shared items. This has no effect on the user's language preference configured under "personal -> language" once they have logged in */
|
||||
"default_language" => "en",
|
||||
|
||||
/* Path to the parent directory of the 3rdparty directory */
|
||||
"3rdpartyroot" => "",
|
||||
|
||||
|
@ -154,7 +157,7 @@ $CONFIG = array(
|
|||
/* Enable/disable X-Frame-Restriction */
|
||||
/* HIGH SECURITY RISK IF DISABLED*/
|
||||
"xframe_restriction" => true,
|
||||
|
||||
|
||||
/* The directory where the user data is stored, default to data in the owncloud
|
||||
* directory. The sqlite database is also stored here, when sqlite is used.
|
||||
*/
|
||||
|
|
|
@ -298,6 +298,12 @@ class OC_L10N{
|
|||
}
|
||||
}
|
||||
|
||||
$default_language = OC_Config::getValue('default_language', false);
|
||||
|
||||
if($default_language !== false) {
|
||||
return $default_language;
|
||||
}
|
||||
|
||||
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||
$accepted_languages = preg_split('/,\s*/', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
|
||||
if(is_array($app)) {
|
||||
|
|
Loading…
Reference in New Issue