1@node Translation Intro 2@chapter Notes on the Free Translation Project 3 4@set STATUS November 2007 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 Note: We don't document the locale aliases, because they are less and less 125@c used - locale.alias contains not a single UTF-8 locale and still lists 126@c ISO-8859-1 for countries which have long adopted the Euro and switched to 127@c ISO-8859-15. 128@c 129As a user, if your language has been installed for this package, you 130only have to set the @code{LANG} environment variable to the appropriate 131@samp{@var{ll}_@var{CC}} combination. If you happen to have the @code{LC_ALL} 132or some other @code{LC_xxx} environment variables set, you should unset them 133before setting @code{LANG}, otherwise the setting of @code{LANG} will not 134have the desired effect. Here @samp{@var{ll}} is an 135@w{ISO 639} two-letter language code, and @samp{@var{CC}} is an 136@w{ISO 3166} two-letter country code. For example, let's suppose that you 137speak German and live in Germany. At the shell prompt, merely execute 138@w{@samp{setenv LANG de_DE}} (in @code{csh}), 139@w{@samp{export LANG; LANG=de_DE}} (in @code{sh}) or 140@w{@samp{export LANG=de_DE}} (in @code{bash}). This can be done from your 141@file{.login} or @file{.profile} file, once and for all. 142 143You might think that the country code specification is redundant. But in 144fact, some languages have dialects in different countries. For example, 145@samp{de_AT} is used for Austria, and @samp{pt_BR} for Brazil. The country 146code serves to distinguish the dialects. 147 148The locale naming convention of @samp{@var{ll}_@var{CC}}, with 149@samp{@var{ll}} denoting the language and @samp{@var{CC}} denoting the 150country, is the one use on systems based on GNU libc. On other systems, 151some variations of this scheme are used, such as @samp{@var{ll}} or 152@samp{@var{ll}_@var{CC}.@var{encoding}}. You can get the list of 153locales supported by your system for your language by running the command 154@samp{locale -a | grep '^@var{ll}'}. 155 156Not all programs have translations for all languages. By default, an 157English message is shown in place of a nonexistent translation. If you 158understand other languages, you can set up a priority list of languages. 159This is done through a different environment variable, called 160@code{LANGUAGE}. GNU @code{gettext} gives preference to @code{LANGUAGE} 161over @code{LANG} for the purpose of message handling, but you still 162need to have @code{LANG} set to the primary language; this is required 163by other parts of the system libraries. 164For example, some Swedish users who would rather read translations in 165German than English for when Swedish is not available, set @code{LANGUAGE} 166to @samp{sv:de} while leaving @code{LANG} to @samp{sv_SE}. 167 168Special advice for Norwegian users: The language code for Norwegian 169bokm@ringaccent{a}l changed from @samp{no} to @samp{nb} recently (in 2003). 170During the transition period, while some message catalogs for this language 171are installed under @samp{nb} and some older ones under @samp{no}, it's 172recommended for Norwegian users to set @code{LANGUAGE} to @samp{nb:no} so that 173both newer and older translations are used. 174 175In the @code{LANGUAGE} environment variable, but not in the @code{LANG} 176environment variable, @samp{@var{ll}_@var{CC}} combinations can be 177abbreviated as @samp{@var{ll}} to denote the language's main dialect. 178For example, @samp{de} is equivalent to @samp{de_DE} (German as spoken in 179Germany), and @samp{pt} to @samp{pt_PT} (Portuguese as spoken in Portugal) 180in this context. 181 182@c An operating system might already offer message localization for many of 183@c its programs, while other programs have been 184@c installed locally with the full capabilities of GNU @code{gettext}. 185@c Just using @code{gettext} extended syntax for @code{LANG} would break 186@c proper localization of already available operating system programs. 187@c FIXME: The user doesn't care about design justifications. --bruno 188 189@node Translating Teams 190@section Translating Teams 191 192For the Free Translation Project to be a success, we need interested 193people who like their own language and write it well, and who are also 194able to synergize with other translators speaking the same language. 195Each translation team has its own mailing list. The up-to-date list 196of teams can be found at the Free Translation Project's homepage, 197@file{http://translationproject.org/}, in the "Teams" area. 198 199If you'd like to volunteer to @emph{work} at translating messages, you 200should become a member of the translating team for your own language. 201The subscribing address is @emph{not} the same as the list itself, it 202has @samp{-request} appended. For example, speakers of Swedish can send 203a message to @w{@file{sv-request@@li.org}}, having this message body: 204 205@example 206subscribe 207@end example 208 209Keep in mind that team members are expected to participate 210@emph{actively} in translations, or at solving translational 211difficulties, rather than merely lurking around. If your team does not 212exist yet and you want to start one, or if you are unsure about what to 213do or how to get started, please write to 214@w{@file{coordinator@@translationproject.org}} to reach the 215coordinator for all translator teams. 216 217The English team is special. It works at improving and uniformizing 218the terminology in use. Proven linguistic skills are praised 219more than programming skills, here. 220 221@node Available Packages 222@section Available Packages 223 224Languages are not equally supported in all packages. The following 225matrix shows the current state of internationalization, as of 226@value{STATUS}. The matrix shows, in regard of each package, for which 227languages PO files have been submitted to translation coordination, 228with a translation percentage of at least 50%. 229 230@include matrix.texi 231 232Some counters in the preceding matrix are higher than the number of visible 233blocks let us expect. This is because a few extra PO files are used for 234implementing regional variants of languages, or language dialects. 235 236For a PO file in the matrix above to be effective, the package to which 237it applies should also have been internationalized and distributed as 238such by its maintainer. There might be an observable lag between the 239mere existence a PO file and its wide availability in a distribution. 240 241If @value{STATUS} seems to be old, you may fetch a more recent copy 242of this @file{ABOUT-NLS} file on most GNU archive sites. The most 243up-to-date matrix with full percentage details can be found at 244@file{http://translationproject.org/extra/matrix.html}. 245 246 247@node Using gettext in own code 248@section Using @code{gettext} in new packages 249 250If you are writing a freely available program and want to internationalize 251it you are welcome to use GNU @file{gettext} in your package. Of course 252you have to respect the GNU Library General Public License which covers 253the use of the GNU @file{gettext} library. This means in particular that 254even non-free programs can use @code{libintl} as a shared library, whereas 255only free software can use @code{libintl} as a static library or use 256modified versions of @code{libintl}. 257 258Once the sources are changed appropriately and the setup can handle the 259use of @code{gettext} the only thing missing are the translations. The 260Free Translation Project is also available for packages which are not 261developed inside the GNU project. Therefore the information given above 262applies also for every other Free Software Project. Contact 263@w{@file{coordinator@@translationproject.org}} to make the @file{.pot} files 264available to the translation teams. 265