[doc] misc. fix & improvements
[scilab.git] / scilab / modules / localization / help / en_US / setdefaultlanguage.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2007 - INRIA - Allan CORNET
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="setdefaultlanguage" xml:lang="en">
17     <refnamediv>
18         <refname>setdefaultlanguage</refname>
19         <refpurpose>sets the language of the session at startup and for some fixed Scilab menus</refpurpose>
20     </refnamediv>
21     <refsynopsisdiv>
22         <title>Syntax</title>
23         <synopsis>setdefaultlanguage(language)</synopsis>
24     </refsynopsisdiv>
25     <refsection>
26         <title>Arguments</title>
27         <variablelist>
28             <varlistentry>
29                 <term>language</term>
30                 <listitem>
31                     <para>a string made of a two-letter, lower-case, ISO Language Code, optionally followed by an underscore and a two-letter, upper-case, ISO country code), such as: 'fr', 'en', 'en_US', 'ru_RU', 'zh_TW'...</para>
32                 </listitem>
33             </varlistentry>
34         </variablelist>
35     </refsection>
36     <refsection>
37         <title>Description</title>
38         <para>
39             <literal>setdefaultlanguage(language)</literal> changes the language used by Scilab user interface, including help, error messages, and saves this changes as the default for subsequent runs of Scilab.
40         </para>
41         <para>Menus will only be changed to the new language once Scilab is restarted.</para>
42         <para>
43             <literal>setdefaultlanguage('')</literal> resets the language to the system value.
44         </para>
45         <para>
46             <literal>setdefaultlanguage</literal> only works on Windows. On others operating systems, it does nothing and always returns <literal>%f</literal>.
47         </para>
48     </refsection>
49     <refsection>
50         <title>Examples</title>
51         <programlisting role="example"><![CDATA[
52 setdefaultlanguage('en_US')
53
54 // restart Scilab
55 getlanguage()
56 setdefaultlanguage('fr_FR')
57
58 // restart Scilab
59 getlanguage()
60 setdefaultlanguage('')
61
62 // restart scilab
63  ]]></programlisting>
64     </refsection>
65     <refsection role="see also">
66         <title>See also</title>
67         <simplelist type="inline">
68             <member>
69                 <link linkend="getlanguage">getlanguage</link>
70             </member>
71             <member>
72                 <link linkend="setlanguage">setlanguage</link>
73             </member>
74         </simplelist>
75     </refsection>
76 </refentry>