aboutsummaryrefslogtreecommitdiffstats
path: root/include/language.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-02-15 20:32:42 -0800
committerredmatrix <git@macgirvin.com>2016-02-15 20:32:42 -0800
commitbb381daae3b6bf8d230fd0c846a815689e0ff723 (patch)
tree7320f5b3e86de0b30e87f82dbe532263011fea2d /include/language.php
parentd3c779f635752c80af8462f04761da7be292a733 (diff)
downloadvolse-hubzilla-bb381daae3b6bf8d230fd0c846a815689e0ff723.tar.gz
volse-hubzilla-bb381daae3b6bf8d230fd0c846a815689e0ff723.tar.bz2
volse-hubzilla-bb381daae3b6bf8d230fd0c846a815689e0ff723.zip
update fr strings from transifex
Diffstat (limited to 'include/language.php')
-rw-r--r--include/language.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/language.php b/include/language.php
index cea31924c..c843db85e 100644
--- a/include/language.php
+++ b/include/language.php
@@ -65,15 +65,22 @@ function get_best_language() {
if(isset($langs) && count($langs)) {
foreach ($langs as $lang => $v) {
$lang = strtolower($lang);
- if(file_exists("view/$lang") && is_dir("view/$lang")) {
+ if(is_dir("view/$lang")) {
$preferred = $lang;
break;
}
}
}
- if(isset($preferred))
- return $preferred;
+ if(! isset($preferred))
+ $preferred = 'unset';
+
+ $arr = array('langs' => $langs, 'preferred' => $preferred);
+
+ call_hooks('get_best_language',$arr);
+
+ if($arr['preferred'] !== 'unset')
+ return $arr['preferred'];
$a = get_app();
return ((isset($a->config['system']['language'])) ? $a->config['system']['language'] : 'en');