Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloud.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-11-09 23:53:47 +0300
committerLukas Reschke <lukas@statuscode.ch>2016-11-10 13:03:05 +0300
commit913dee125adea39abec363f55e2fb54a42e0c9b8 (patch)
tree9e4d2e4fad01b51e42b0063b8ef6580b1fdba84e /l10n.php
parent1b97eccca1e8f21fa832227036c6e110c4808688 (diff)
Use /de/ for DE
Diffstat (limited to 'l10n.php')
-rw-r--r--l10n.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/l10n.php b/l10n.php
index db6ecb9c..15be3b9d 100644
--- a/l10n.php
+++ b/l10n.php
@@ -41,10 +41,11 @@ class L10N {
* @return string
*/
private function getCurrentLanguage() {
- if(isset($_GET['hl'])) {
- $hl = strtolower((string)$_GET['hl']);
- if(ctype_alnum($hl) && strlen($hl) === 2) {
- return $hl;
+ $path = parse_url(site_url())['path'];
+ $language = explode('/', substr($_SERVER['REQUEST_URI'], strlen($path)));
+ if(isset($language[1]) && strlen($language[1]) === 2) {
+ if(ctype_alnum($language[1])) {
+ return $language[1];
}
}