1@node Translation Intro 2@chapter Notes on the Free Translation Project 3 4@set STATUS October 2006 5 6Free software is going international! The Free Translation Project is 7a way to get maintainers of free software, translators, and users all 8together, so that free software will gradually become able to speak many 9languages. A few packages already provide translations for their messages. 10 11If you found this @file{ABOUT-NLS} file inside a distribution, you 12may assume that the distributed package does use GNU @code{gettext} 13internally, itself available at your nearest GNU archive site. But you 14do @emph{not} need to install GNU @code{gettext} prior to configuring, 15installing or using this package with messages translated. 16 17Installers will find here some useful hints. These notes also explain 18how users should proceed for getting the programs to use the available 19translations. They tell how people wanting to contribute and work 20on translations can contact the appropriate team. 21 22When reporting bugs in the @file{intl/} directory or bugs which may 23be related to internationalization, you should tell about the version 24of @code{gettext} which is used. The information can be found in 25the @file{intl/VERSION} file, in internationalized packages. 26 27@menu 28* Configuration advice:: 29* INSTALL Matters:: 30* Using This Package:: 31* Translating Teams:: 32* Available Packages:: 33* Using gettext in own code:: 34@end menu 35 36@node Configuration advice 37@section Quick configuration advice 38 39If you want to exploit the full power of internationalization, you 40should configure it using 41 42@example 43./configure --with-included-gettext 44@end example 45 46@noindent 47to force usage of internationalizing routines provided within this 48package, despite the existence of internationalizing capabilities in the 49operating system where this package is being installed. So far, only 50the @code{gettext} implementation in the GNU C library version 2 51provides as many features (such as locale alias, message inheritance, 52automatic charset conversion or plural form handling) 53as the implementation here. It is also not possible to offer this 54additional functionality on top of a @code{catgets} implementation. 55Future versions of GNU @code{gettext} will very likely convey even more 56functionality. So it might be a good idea to change to GNU 57@code{gettext} as soon as possible. 58 59So you need @emph{not} provide this option if you are using GNU libc 2 or 60you have installed a recent copy of the GNU gettext package with the 61included @file{libintl}. 62 63 64@node INSTALL Matters 65@section INSTALL Matters 66 67Some packages are @dfn{localizable} when properly installed; the 68programs they contain can be made to speak your own native language. 69Most such packages use GNU @code{gettext}. Other packages have their 70own ways to internationalization, predating GNU @code{gettext}. 71 72By default, this package will be installed to allow translation of 73messages. It will automatically detect whether the system already 74provides the GNU @code{gettext} functions. If not, the included GNU 75@code{gettext} library will be used. This library is wholly 76contained within this package, usually in the @file{intl/} subdirectory, 77so prior installation of the GNU @code{gettext} package is @emph{not} 78required. Installers may use special options at configuration time for 79changing the default behaviour. The commands: 80 81@example 82./configure --with-included-gettext 83./configure --disable-nls 84@end example 85 86@noindent 87will, respectively, bypass any pre-existing @code{gettext} to use the 88internationalizing routines provided within this package, or else, 89@emph{totally} disable translation of messages. 90 91When you already have GNU @code{gettext} installed on your system and 92run configure without an option for your new package, @code{configure} 93will probably detect the previously built and installed @file{libintl.a} 94file and will decide to use this. This might not be desirable. 95You should use the more recent version of the GNU @code{gettext} 96library. I.e.@: if the file @file{intl/VERSION} shows that the library 97which comes with this package is more recent, you should use 98 99@example 100./configure --with-included-gettext 101@end example 102 103@noindent 104to prevent auto-detection. 105 106The configuration process will not test for the @code{catgets} function 107and therefore it will not be used. The reason is that even an 108emulation of @code{gettext} on top of @code{catgets} could not provide 109all the extensions of the GNU @code{gettext} library. 110 111Internationalized packages usually have many @file{po/@var{ll}.po} 112files, where @var{ll} gives an @w{ISO 639} two-letter code 113identifying the language. Unless translations have been forbidden 114at @code{configure} time by using the @samp{--disable-nls} switch, 115all available translations are installed together with the package. 116However, the environment variable @code{LINGUAS} may be set, prior 117to configuration, to limit the installed set. @code{LINGUAS} should 118then contain a space separated list of two-letter codes, stating 119which languages are allowed. 120 121@node Using This Package 122@section Using This Package 123 124@c -- 125@c FIXME: rewrite to document the aliases. 126@c -- 127As a user, if your language has been installed for this package, you 128only have to set the @code{LANG} environment variable to the appropriate 129@samp{@var{ll}_@var{CC}} combination. Here @samp{@var{ll}} is an 130@w{ISO 639} two-letter language code, and @samp{@var{CC}} is an 131@w{ISO 3166} two-letter country code. For example, let's suppose that you 132speak German and live in Germany. At the shell prompt, merely execute 133@w{@samp{setenv LANG de_DE}} (in @code{csh}), 134@w{@samp{export LANG; LANG=de_DE}} (in @code{sh}) or 135@w{@samp{export LANG=de_DE}} (in @code{bash}). This can be done from your 136@file{.login} or @file{.profile} file, once and for all. 137 138You might think that the country code specification is redundant. But in 139fact, some languages have dialects in different countries. For example, 140@samp{de_AT} is used for Austria, and @samp{pt_BR} for Brazil. The country 141code serves to distinguish the dialects. 142 143The locale naming convention of @samp{@var{ll}_@var{CC}}, with 144@samp{@var{ll}} denoting the language and @samp{@var{CC}} denoting the 145country, is the one use on systems based on GNU libc. On other systems, 146some variations of this scheme are used, such as @samp{@var{ll}} or 147@samp{@var{ll}_@var{CC}.@var{encoding}}. You can get the list of 148locales supported by your system for your language by running the command 149@samp{locale -a | grep '^@var{ll}'}. 150 151Not all programs have translations for all languages. By default, an 152English message is shown in place of a nonexistent translation. If you 153understand other languages, you can set up a priority list of languages. 154This is done through a different environment variable, called 155@code{LANGUAGE}. GNU @code{gettext} gives preference to @code{LANGUAGE} 156over @code{LANG} for the purpose of message handling, but you still 157need to have @code{LANG} set to the primary language; this is required 158by other parts of the system libraries. 159For example, some Swedish users who would rather read translations in 160German than English for when Swedish is not available, set @code{LANGUAGE} 161to @samp{sv:de} while leaving @code{LANG} to @samp{sv_SE}. 162 163Special advice for Norwegian users: The language code for Norwegian 164bokm@ringaccent{a}l changed from @samp{no} to @samp{nb} recently (in 2003). 165During the transition period, while some message catalogs for this language 166are installed under @samp{nb} and some older ones under @samp{no}, it's 167recommended for Norwegian users to set @code{LANGUAGE} to @samp{nb:no} so that 168both newer and older translations are used. 169 170In the @code{LANGUAGE} environment variable, but not in the @code{LANG} 171environment variable, @samp{@var{ll}_@var{CC}} combinations can be 172abbreviated as @samp{@var{ll}} to denote the language's main dialect. 173For example, @samp{de} is equivalent to @samp{de_DE} (German as spoken in 174Germany), and @samp{pt} to @samp{pt_PT} (Portuguese as spoken in Portugal) 175in this context. 176 177@c An operating system might already offer message localization for many of 178@c its programs, while other programs have been 179@c installed locally with the full capabilities of GNU @code{gettext}. 180@c Just using @code{gettext} extended syntax for @code{LANG} would break 181@c proper localization of already available operating system programs. 182@c FIXME: The user doesn't care about design justifications. --bruno 183 184@node Translating Teams 185@section Translating Teams 186 187For the Free Translation Project to be a success, we need interested 188people who like their own language and write it well, and who are also 189able to synergize with other translators speaking the same language. 190Each translation team has its own mailing list. The up-to-date list 191of teams can be found at the Free Translation Project's homepage, 192@file{http://www.iro.umontreal.ca/contrib/po/HTML/}, in the 193"National teams" area. 194 195If you'd like to volunteer to @emph{work} at translating messages, you 196should become a member of the translating team for your own language. 197The subscribing address is @emph{not} the same as the list itself, it 198has @samp{-request} appended. For example, speakers of Swedish can send 199a message to @w{@file{sv-request@@li.org}}, having this message body: 200 201@example 202subscribe 203@end example 204 205Keep in mind that team members are expected to participate 206@emph{actively} in translations, or at solving translational 207difficulties, rather than merely lurking around. If your team does not 208exist yet and you want to start one, or if you are unsure about what to 209do or how to get started, please write to 210@w{@file{translation@@iro.umontreal.ca}} to reach the 211coordinator for all translator teams. 212 213The English team is special. It works at improving and uniformizing 214the terminology in use. Proven linguistic skills are praised 215more than programming skills, here. 216 217@node Available Packages 218@section Available Packages 219 220Languages are not equally supported in all packages. The following 221matrix shows the current state of internationalization, as of 222@value{STATUS}. The matrix shows, in regard of each package, for which 223languages PO files have been submitted to translation coordination, 224with a translation percentage of at least 50%. 225 226@include matrix.texi 227 228Some counters in the preceding matrix are higher than the number of visible 229blocks let us expect. This is because a few extra PO files are used for 230implementing regional variants of languages, or language dialects. 231 232For a PO file in the matrix above to be effective, the package to which 233it applies should also have been internationalized and distributed as 234such by its maintainer. There might be an observable lag between the 235mere existence a PO file and its wide availability in a distribution. 236 237If @value{STATUS} seems to be old, you may fetch a more recent copy 238of this @file{ABOUT-NLS} file on most GNU archive sites. The most 239up-to-date matrix with full percentage details can be found at 240@file{http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html}. 241 242 243@node Using gettext in own code 244@section Using @code{gettext} in new packages 245 246If you are writing a freely available program and want to internationalize 247it you are welcome to use GNU @file{gettext} in your package. Of course 248you have to respect the GNU Library General Public License which covers 249the use of the GNU @file{gettext} library. This means in particular that 250even non-free programs can use @code{libintl} as a shared library, whereas 251only free software can use @code{libintl} as a static library or use 252modified versions of @code{libintl}. 253 254Once the sources are changed appropriately and the setup can handle the 255use of @code{gettext} the only thing missing are the translations. The 256Free Translation Project is also available for packages which are not 257developed inside the GNU project. Therefore the information given above 258applies also for every other Free Software Project. Contact 259@w{@file{translation@@iro.umontreal.ca}} to make the @file{.pot} files 260available to the translation teams. 261