aboutsummaryrefslogtreecommitdiffstats
path: root/mod/help.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-18 06:47:57 +1000
committerredmatrix <git@macgirvin.com>2016-04-18 06:47:57 +1000
commit5591eac973c934a8e0cd7602e61e1f6aabe08c66 (patch)
tree70cead4d5e43cf94d0cc1f3ebd6977f6b911827c /mod/help.php
parentce582ccadaaf91b611d1c2529b2ba21fc36f5f17 (diff)
parentf4cca21fdf99f0cdd9be900c9190f7e5f6590828 (diff)
downloadvolse-hubzilla-5591eac973c934a8e0cd7602e61e1f6aabe08c66.tar.gz
volse-hubzilla-5591eac973c934a8e0cd7602e61e1f6aabe08c66.tar.bz2
volse-hubzilla-5591eac973c934a8e0cd7602e61e1f6aabe08c66.zip
Merge pull request #345 from anaqreon/context-help
New help panel that slides in from the top and pushes the content ...
Diffstat (limited to 'mod/help.php')
-rw-r--r--mod/help.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/mod/help.php b/mod/help.php
index fb0339cd9..8c27156ab 100644
--- a/mod/help.php
+++ b/mod/help.php
@@ -88,9 +88,17 @@ function load_context_help() {
$path = App::$cmd;
$args = App::$argv;
-
+ $lang = App::$language;
+
+ if(! isset($lang) || !is_dir('doc/context/' . $lang . '/')) {
+ $lang = 'en';
+ }
while($path) {
- $context_help = load_doc_file('doc/context/' . $path . '/help.html');
+ $context_help = load_doc_file('doc/context/' . $lang . '/' . $path . '/help.html');
+ if(!$context_help) {
+ // Fallback to English if the translation is absent
+ $context_help = load_doc_file('doc/context/en/' . $path . '/help.html');
+ }
if($context_help)
break;
array_pop($args);