aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-04-17 07:29:08 -0400
committerAndrew Manning <tamanning@zoho.com>2016-04-17 07:29:08 -0400
commitf4cca21fdf99f0cdd9be900c9190f7e5f6590828 (patch)
tree70cead4d5e43cf94d0cc1f3ebd6977f6b911827c /mod
parentd7fe48d1b683bf11c796dca22c01b83076d1e96b (diff)
downloadvolse-hubzilla-f4cca21fdf99f0cdd9be900c9190f7e5f6590828.tar.gz
volse-hubzilla-f4cca21fdf99f0cdd9be900c9190f7e5f6590828.tar.bz2
volse-hubzilla-f4cca21fdf99f0cdd9be900c9190f7e5f6590828.zip
Recover lost language translation accommodation and doc/context restructuring
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);