Docbook cleanup to address many errors during DocBook processing including fop overfl...
[working/Evergreen.git] / 1.6 / admin / localization.xml
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <chapter xml:id="languagesandlocalization" xmlns="" xmlns:xi="" xmlns:xl="">\r
3 <info>\r
4 <title>Languages and Localization</title>\r
5 </info>\r
6         <section xml:id="enabling_and_disabling_localization">                  \r
7                 <title>Enabling and Disabling Languages</title>\r
8                 <para>Evergreen 1.6 is bundled with support for a number of languages beyond American English (<emphasis role="bold">en-US</emphasis>). The translated interfaces are \r
9                 split between static files that are automatically installed with Evergreen, and dynamic labels that can be stored in the Evergreen database. Evergreen is \r
10                 installed with additional SQL files that contain translated dynamic labels for a number of languages, and to make the set of translated labels available in \r
11                 all interfaces. Only a few steps are required to enable or disable one or more languages.</para>\r
12                 <simplesect>\r
13                         <title>Enabling a Localization</title>\r
14                         <indexterm><primary>languages</primary><secondary>enabling a localization</secondary></indexterm>\r
15                         <para>To enable the translated labels for a given language to display in Evergreen, just populate the database with the translated labels and enable the localization. The \r
16                         following example illustrates how to enable Canadian French (<emphasis role="bold">fr-CA</emphasis>) support in the database. These same steps can be used with any of the \r
17                         languages bundled with Evergreen, or you can create and add your own localization.</para>\r
18                         <orderedlist>\r
19                                 <listitem>\r
20                                         <para>The translated labels for each locale are stored in SQL files named "" where "xx-YY" represents the locale code for \r
21                                         the translation. Load the translated labels into the Evergreen database using the command <command>psql</command>, substituting your user, host and \r
22                                         database connection information accordingly:</para>\r
23 <programlisting language="xml"><![CDATA[\r
24 $ psql -U <username> -h <hostname> -d <database> \ \r
25 -f /path/to/Evergreen-source/Open-ILS/src/sql/Pg/\r
26 ]]></programlisting>\r
27                                 </listitem>\r
28                                 <listitem>\r
29                                         <para>Ensure the locale is enabled in the Evergreen database by using the utility <command>psql</command> to check for the existence of the locale in the \r
30                                         table <literal>config.i18n_locale</literal>:</para>\r
31                                         \r
32 <screen>\r
33 <userinput>SELECT code, marc_code, name, description\r
34 FROM config.i18n_locale\r
35 WHERE code = 'fr-CA';</userinput>\r
36 </screen>\r
37                                 \r
38                                         <para>As shown in the following example, if one row of output is returned, then the locale is already enabled:</para>\r
39 <screen>\r
40 code  | marc_code |      name       |   description   \r
41 ------+-----------+-----------------+-----------------\r
42 fr-CA | fre       | French (Canada) | Canadian French\r
43 (1 row)\r
44 </screen>\r
45                                         <para>If zero rows of output are returned, then the locale is not enabled:</para>\r
46 <screen>\r
47 code | marc_code | name | description \r
48 ------+-----------+------+-------------\r
49 (0 rows)\r
50 </screen>\r
51                                         <para>To enable a locale, use <command>psql</command> to insert a row into the table <literal>config.i18n_locale</literal> as follows:</para>\r
52 <screen>\r
53 INSERT INTO config.i18n_locale (code, marc_code, name, description)\r
54 VALUES ('fr-CA', 'fre', 'French (Canada)', 'Canadian French');\r
55 </screen>\r
56                                 </listitem>\r
57                         </orderedlist>\r
58                 </simplesect>\r
59                 <simplesect>\r
60                         <title>Disabling a Localization</title>\r
61                         <indexterm><primary>languages</primary><secondary>disabling a localization</secondary></indexterm>\r
62                         <para>You might not want to offer all of the localizations that are preconfigured in Evergreen. If you choose to disable the dynamic labels for a locale, just delete those \r
63                         entries from the table <literal>config.i18n_locale</literal> using the <command>psql</command> utility:</para>\r
64 <screen>\r
65 <userinput>DELETE FROM config.i18n_locale\r
66 WHERE code = 'fr-CA';</userinput>\r
67 </screen>\r
68                 </simplesect>\r
69         </section>\r
70 </chapter>\r