configure: replaced option '--with-nls' by autoconf's '--localedir'
[wmaker-crm.git] / doc / build / Translations.texi
blob995da7aa454345bba8c423485020834911afec71
1 \input texinfo   @c -*-texinfo-*-
2 @c %**start of header
3 @setfilename wmaker_i18n.info
4 @settitle Window Maker Internationalisation 1.0
5 @c %**end of header
7 @c This documentation is written in Texinfo format:
8 @c   https://www.gnu.org/software/texinfo/manual/texinfo/
9 @c
10 @c The reference checker is the GNU texi2any tool, which can be invoked like this:
11 @c   texi2any --plaintext --no-split --verbose Translations.texi
13 @c If you modify this file, you may want to spell-check it with:
14 @c    aspell --lang=en_GB --mode=texinfo check Translations.texi
16 @c The length of lines in this file is set to 100 because it tends to keep sentences together
17 @c despite the embedded @commands{};
19 @c It is generally considered good practice for Tex and Texinfo formats to keep sentences on
20 @c different lines, using the fact that in the end they will be merged in paragraph anyway, because
21 @c it makes the patchs clearer about where the changes actually are.
23 @finalout
25 @set version git#next
27 @c ---------------------------------------------------------------------------------- Title Page ---
29 @copying
30 @noindent
31 This manual is for @sc{Window Maker} window manager, version @value{version}.
33 @noindent Copyright @copyright{} 2015 The Window Maker Team.
35 @quotation
36 This program is free software; you can redistribute it and/or modify
37 it under the terms of the GNU General Public License as published by
38 the Free Software Foundation; either version 2 of the License, or
39 (at your option) any later version.
41 This program is distributed in the hope that it will be useful,
42 but WITHOUT ANY WARRANTY; without even the implied warranty of
43 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
44 GNU General Public License for more details.
46 You should have received a copy of the GNU General Public License along
47 with this program, see file COPYING for details.
48 @end quotation
49 @end copying
51 @titlepage
52 @title Window Maker Internationalisation
53 @subtitle A guide to enable support for language translations
54 @subtitle in @sc{Window Maker}.
55 @author Christophe CURIS
57 @page
58 @vskip 0pt plus 1filll
59 @insertcopying
61 @sp 1
62 Published by The Window Maker team on @today{}.
63 @end titlepage
65 @c ---------------------------------------------------------------------------- Table of Content ---
66 @node Top
67 @ifnottex
68 @top Window Maker Internationalisation
70 A guide to enable support for language translations
71 in @sc{Window Maker}.
72 @end ifnottex
74 @contents
76 @ifnottex
77 @sp 1
78 This manual is for Window Maker, version @value{version}.
79 @end ifnottex
81 @menu
82 * Enabling Languages support::  How to compile Window Maker with i18n support
83 * Choosing the Language::       When installed, how to run wmaker with your language
84 @end menu
87 @c ------------------------------------------------------------------ Enabling Languages support ---
89 @node Enabling Languages support
90 @chapter Enabling Languages support
92 @sc{Window Maker} has the possibility to be translated in many languages, but by default none of
93 them will be installed, and the support for translation will not be compiled.
95 To enable the translation capabilities, you have to specify which language(s) you want to be
96 installed: this is done with the variable @env{LINGUAS} when running the @command{configure} script.
97 This variable should contain the space-separated list of languages you want to install.
99 You could for instance enable both French (@code{fr}) and Dutch (@code{nl}) with this:
101 @example
102 ./configure LINGUAS="fr nl"
103 @end example
105 You can of course add any other option that you want to the @command{configure} command.
106 From the moment you specify the variable, the @command{configure} script will check that you have
107 the appropriate dependencies for this (basically the @code{gettext} function and the @code{libintl}
108 library); when you run @command{make} to compile the project, it will also compile the translation
109 (@code{mo} files) for the language(s) you asked (if available, of course), and during
110 @command{make install} it will install them in the usual directory.
112 The installation directory can be changed with the standard option @option{--localedir} to the
113 @command{configure} script, the default path being
114 @file{@emph{<prefix>}/share/locale/@emph{<lang>}/LC_MESSAGES}).
117 @c --------------------------------------------------------------------- LINGUAS at system level ---
118 @section Setting @env{LINGUAS} at system level
120 As the variable @env{LINGUAS} is quite standard, you also have the possibility to set its value in
121 the @file{config.site} file for @sc{Autoconf}.
122 This file can be placed in one of these paths:
124 @itemize @bullet
125 @item @file{@emph{<prefix>}/share/config.site}
126 @item @file{@emph{<prefix>}/etc/config.site}
127 @end itemize
129 This way, the same language list will be used for all the programs that use @sc{Autoconf} that you
130 would compile.
131 Please note that if you also specify a value on the command line, it will have precedence over the
132 value in that file.
135 @c ----------------------------------------------------------------------- Choosing the Language ---
136 @node Choosing the Language
137 @chapter Choosing the Language
139 If you have compiled and installed @sc{Window Maker} with support for your language,
140 the effective translation is done is the very same way as any other application on an @sc{Unix}
141 system, you just have to set the shell variable @env{LANG} to your language before @command{wmaker}
142 is started.
143 In @command{sh} type of shell (@sc{sh}, @sc{ksh}, @sc{bash}, ...), this is done for example with
144 (@code{fr} is for French):
146 @example
147 export LANG=fr
148 @end example
151 There is also a command line option @option{--locale} for @sc{Window Maker} which may be used to set
152 the language:
154 @example
155 wmaker --locale fr
156 @end example
158 When using this option, @sc{Window Maker} will use the locale you specified, redefining the
159 @env{LANG} environment variable to this value so all program started from @sc{Window Maker} will
160 inherit its value.
163 If your system is using @sc{systemd}, you can also configure the locale at system level using the
164 command:
166 @example
167 localectl set-locale LANG=fr
168 @end example
171 You can check if the current value is properly supported with the command:
173 @example
174 locale
175 @end example
177 If this does not work, you may need first to activate the support for your locale in the system;
178 you can get the list of currently enabled locales with the command:
180 @example
181 locale -a
182 @end example
184 You should be able to enable a new language support by editing the file @file{/etc/locale.gen} to
185 uncomment the locale(s) you need (by removing the @code{#} character and space(s) in front of it,
186 and by running the command @command{locale-gen} as root.
188 For further information, you may wish to read dedicated documentation, for example from
189 @uref{http://tldp.org/HOWTO/HOWTO-INDEX/other-lang.html, the Linux Documentation Project}
190 or through pages like
191 @uref{http://www.shellhacks.com/en/HowTo-Change-Locale-Language-and-Character-Set-in-Linux,Shell Hacks' note on Changing Locale}.
194 @c ------------------------------------------------------------------------------------- The End ---
195 @bye