Replace fr by fr_FR and en by en_US
[scilab.git] / scilab / modules / helptools / macros / help.sci
1 function help(key)
2         
3         //for compatibility with toolboxes making use of old cat files
4         
5         if (fileinfo('SCI/modules/helptools/help') <> []) then
6                 
7                 global %browsehelp
8                 nwniarg=find(sciargs()=="-nwni");
9                 texmacsarg=find(sciargs()=="--texmacs");
10                 noguiarg=find(sciargs()=="-nogui");
11                 
12                 if (%browsehelp<>[])&(nwniarg == [])&(texmacsarg == [])&(noguiarg == []) then
13                         
14                         change_old_man()
15                         INDEX=make_help_index()
16                         
17                         if argn(2)==0 then
18                                 browsehelp(INDEX,"index");
19                                 return
20                         end
21                         
22                         key=stripblanks(key)
23                         
24                         if or(part(key,1)==['(',')','[',']','{','}','%','''','""',':','*','/', ...
25                                 '\','.','<','>','&','^','|','~','+','-']) then
26                                 key="symbols";
27                         end
28                         
29                         path=gethelpfile(key)
30                         
31                         if path<>[] then
32                                 browsehelp(path,key)
33                         else
34                                 apropos(key)
35                         end
36                         
37                 else
38                         if (%browsehelp == []) then
39                                 warning('%browsehelp not correctly defined. help browser disabled. ');
40                                 return;
41                         end
42                         
43                         errmsg='help browser disabled in this mode : ';
44                         
45                         if ( nwniarg <> []) then
46                                 errmsg=errmsg+'-nwni';
47                                 warning(errmsg);
48                                 return;
49                         end
50                         
51                         if ( texmacsarg <> []) then
52                                 errmsg=errmsg+ '--texmacs';
53                                 warning(errmsg);
54                                 return;
55                         end
56                         
57                         if ( noguiarg <> [] ) then
58                                 errmsg=errmsg+ '-nogui';
59                                 warning(errmsg);
60                                 return;
61                         end
62                 end
63         else
64                 warning('Help not installed');
65         end
66         
67 endfunction
68
69
70
71
72
73
74
75
76