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:
authorJos Poortvliet <jospoortvliet@gmail.com>2018-07-30 11:37:13 +0300
committerJos Poortvliet <jospoortvliet@gmail.com>2018-07-30 11:37:13 +0300
commitcd1f412b3506bc6c5df38820d2c06fdc7ee81d26 (patch)
tree4cf8fe4a86e80ae84884b2658dd5b1543d40514c /functions.php
parent0bb986bc9f6faaf6ae2cfb01ad1c5402db266614 (diff)
fix language matching
Signed-off-by: Jos Poortvliet <jospoortvliet@gmail.com>
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/functions.php b/functions.php
index 4a0364e1..36b83332 100644
--- a/functions.php
+++ b/functions.php
@@ -40,7 +40,7 @@ function translationUrlFilter($url) {
} else {
$count = 3;
}
- $languageEntry = ['br'];
+ $languageEntry = ['pt_BR'];
array_splice($url, $count, 0, $languageEntry);
return implode('/', $url);
}
@@ -62,7 +62,7 @@ function translationUrlFilter($url) {
} else {
$count = 3;
}
- $languageEntry = ['fr'];
+ $languageEntry = ['fr_FR'];
array_splice($url, $count, 0, $languageEntry);
return implode('/', $url);
}
@@ -84,7 +84,7 @@ function translationUrlFilter($url) {
} else {
$count = 3;
}
- $languageEntry = ['mx'];
+ $languageEntry = ['es_MX'];
array_splice($url, $count, 0, $languageEntry);
return implode('/', $url);
}
@@ -95,7 +95,18 @@ function translationUrlFilter($url) {
} else {
$count = 3;
}
- $languageEntry = ['cz'];
+ $languageEntry = ['cz_CZ'];
+ array_splice($url, $count, 0, $languageEntry);
+ return implode('/', $url);
+ }
+ if($language[1] === 'it') {
+ $url = explode('/', $url);
+ if($path !== null) {
+ $count = 4;
+ } else {
+ $count = 3;
+ }
+ $languageEntry = ['it'];
array_splice($url, $count, 0, $languageEntry);
return implode('/', $url);
}