aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Helpindex.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Widget/Helpindex.php')
-rw-r--r--Zotlabs/Widget/Helpindex.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/Zotlabs/Widget/Helpindex.php b/Zotlabs/Widget/Helpindex.php
index f23e73e75..6c8748194 100644
--- a/Zotlabs/Widget/Helpindex.php
+++ b/Zotlabs/Widget/Helpindex.php
@@ -9,14 +9,23 @@ class Helpindex {
$o .= '<div class="widget">';
$level_0 = get_help_content('sitetoc');
- if(! $level_0)
- $level_0 = get_help_content('toc');
+ if(! $level_0) {
+ $path = 'toc';
+ $x = determine_help_language();
+ $lang = $x['language'];
+ if($lang !== 'en') {
+ $path = $lang . '/toc';
+ }
+ $level_0 = get_help_content($path);
+ }
$level_0 = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills flex-column">',$level_0);
$levels = array();
+ // TODO: Implement support for translations in hierarchical table of content files
+ /*
if(argc() > 2) {
$path = '';
for($x = 1; $x < argc(); $x ++) {
@@ -28,6 +37,7 @@ class Helpindex {
$levels[] = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills flex-column">',$y);
}
}
+ */
if($level_0)
$o .= $level_0;