aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-17 19:58:59 -0700
committerredmatrix <git@macgirvin.com>2016-04-17 19:58:59 -0700
commit9cddbc9a47e3d9ddb59165016b93a7ea7ea46a2b (patch)
treed6641301265524f0159f17776cf9376beee5f5dd /mod
parent966773cdbba80103e93290ccf01d0c91df5a000e (diff)
parent7229cd56ede29fd1ac923f9faf097a17fbb06aa3 (diff)
downloadvolse-hubzilla-9cddbc9a47e3d9ddb59165016b93a7ea7ea46a2b.tar.gz
volse-hubzilla-9cddbc9a47e3d9ddb59165016b93a7ea7ea46a2b.tar.bz2
volse-hubzilla-9cddbc9a47e3d9ddb59165016b93a7ea7ea46a2b.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'mod')
-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);