summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-04-07 10:52:17 +0200
committerJoas Schilling <coding@schilljs.com>2017-04-07 11:10:04 +0200
commit9f3d9b5b239b9ebb3ddfec1c9d2d8d2a54be8f2a (patch)
treefa0c73bf29d8211c4a48acc8f29dcf71ded3deb5 /lib
parent536650c02f719cc810a0538c36113b2fa96db605 (diff)
downloadnextcloud-server-9f3d9b5b239b9ebb3ddfec1c9d2d8d2a54be8f2a.tar.gz
nextcloud-server-9f3d9b5b239b9ebb3ddfec1c9d2d8d2a54be8f2a.zip
Don't force the use of Accept-Language anymore
This is not intended anymore, since it falls back to force english when the header is not set. Also 0228bc6e66cbcb2848eacb41f1de6e7f63ebcb65 makes clear that the order should be: 1. User setting 2. Accept language 3. Admin default This is the case since the commit from above, unless via OCS and DAV. Both forced to accept-language falling back to english. By removing the force, it now also matches the w3 priority list: https://www.w3.org/International/questions/qa-lang-priorities Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/L10N/Factory.php18
-rw-r--r--lib/public/L10N/IFactory.php8
2 files changed, 0 insertions, 26 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index 8aad395065c..581ca3fb5d1 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -271,24 +271,6 @@ class Factory implements IFactory {
}
/**
- * @param string|null $app App id or null for core
- * @return string
- */
- public function setLanguageFromRequest($app = null) {
-
- try {
- $requestLanguage = $this->getLanguageFromRequest($app);
- } catch (LanguageNotFoundException $e) {
- $requestLanguage = 'en';
- }
-
- if ($app === null && !$this->requestLanguage) {
- $this->requestLanguage = $requestLanguage;
- }
- return $requestLanguage;
- }
-
- /**
* Checks if $sub is a subdirectory of $parent
*
* @param string $sub
diff --git a/lib/public/L10N/IFactory.php b/lib/public/L10N/IFactory.php
index 0d6e583c7e5..b5f93c2389c 100644
--- a/lib/public/L10N/IFactory.php
+++ b/lib/public/L10N/IFactory.php
@@ -62,14 +62,6 @@ interface IFactory {
public function languageExists($app, $lang);
/**
- * @param string|null $app App id or null for core
- * @return string
- * @since 9.0.0
- */
- public function setLanguageFromRequest($app = null);
-
-
- /**
* Creates a function from the plural string
*
* @param string $string