File: LocalePath.xml

package info (click to toggle)
fvwm 1%3A2.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 15,968 kB
  • sloc: ansic: 145,836; xml: 17,096; perl: 7,237; sh: 5,100; makefile: 1,101; yacc: 688; lex: 187; sed: 11
file content (96 lines) | stat: -rw-r--r-- 3,078 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  "../docbook-xml/docbookx.dtd"
[
<!ENTITY % myents SYSTEM "../fvwm.ent" >
%myents;
]>

<!-- $Id$ -->

<section id='LocalePath'>
<title>LocalePath</title>

<cmdsynopsis>
	<command>LocalePath</command
	><arg choice='plain'
		><replaceable>path</replaceable
	></arg>
</cmdsynopsis>

<para>Specifies a colon separated list of "locale path" in which to
search for string translations. A locale path is constituted by a
directory path and a text domain separated by a semicolon
(';'). As an example the default locale path is:</para>

<programlisting>
/install_prefix/share/locale;fvwm
</programlisting>

<para>where install_prefix is the fvwm installation directory. With such
a locale path translations are searched for in</para>

<programlisting>
/install_prefix/share/locale/lang/LC_MESSAGES/fvwm.mo
</programlisting>

<para>where
<emphasis remap='I'>lang</emphasis>
depends on the locale. If no directory is given the default
directory path is assumed. If no text domain is given,
<command>fvwm</command>
is assumed. Without argument the default locale path is restored.</para>

<para>As for the
<fvwmref cmd="ImagePath"/>
command,
<replaceable>path</replaceable>
may contain environment variables and a '+' to append or prepend
the locale path easily.</para>

<para>For example, the fvwm-themes package uses</para>

<programlisting>
LocalePath ";fvwm-themes:+"
</programlisting>

<para>to add locale catalogs.</para>

<para>The default fvwm catalog contains a few strings used by the fvwm
executable itself (Desk and Geometry) and strings used in some
default configuration files and
<fvwmref mod="FvwmForm"/>
configuration. You can take a look at the po/ subdirectory of the
fvwm source to get the list of the strings with a possible
translation in various languages. At present, very few languages
are supported.</para>

<para>The main use of locale catalogs is via the "$[gt.string]"
parameter:</para>

<programlisting>
<fvwmref cmd="DestroyMenu"/> MenuFvwmWindowOps
<fvwmref cmd="AddToMenu"/>   MenuFvwmWindowOps "$[gt.Window Ops]" <fvwmref cmd="Title"/>
+ "$[gt.&amp;Move]"              <fvwmref cmd="Move"/>
+ "$[gt.&amp;Resize]"            <fvwmref cmd="Resize"/>
+ "$[gt.R&amp;aise]"             <fvwmref cmd="Raise"/>
+ "$[gt.&amp;Lower]"             <fvwmref cmd="Lower"/>
+ "$[gt.(De)&amp;Iconify]"       <fvwmref cmd="Iconify"/>
+ "$[gt.(Un)&amp;Stick]"         <fvwmref cmd="Stick"/>
+ "$[gt.(Un)Ma&amp;ximize]"      <fvwmref cmd="Maximize"/>
+ "" <fvwmref cmd="Nop"/>
+ "$[gt.&amp;Close]"             <fvwmref cmd="Close"/>
+ "$[gt.&amp;Destroy]"           <fvwmref cmd="Destroy"/>
</programlisting>

<para>gives a menu in the locale languages if translations are
available.</para>

<para>Note that the
<fvwmref mod="FvwmScript"/>
module has a set of special instructions for string
translation. It is out of the scope of this discussion to explain
how to build locale catalogs. Please refer to the <acronym>GNU</acronym> gettext
documentation.</para>

</section>