1 Preliminary notes. (Note that all of this has already been done for you
2 in the archive, this is mainly so you can see what to do in your own
5 Create the individiual .pot template files by using:
7 baby:~/ttk-gettext--mainline--1.0> perl make-pot.pl test.tmpl | msguniq > tpl-test.pot
8 (repeat for multiple templates)
9 xgettext --keyword=_ --from-code=utf-8 -o messages.pot -L perl *.pl
11 Merge them all together using msgcat:
13 msgcat *.pot > templates.pot
15 Now you can actually start translating. Do a msginit as usual:
17 LANG=nb_NO.UTF-8 msginit --input templates.pot
19 And then translate using the editor of your choice. kbabel is a popular choice,
20 but you can use your favourite editor by using potool:
24 And then compile it using msgfmt as usual:
26 mkdir -p nb/LC_MESSAGES
27 msgfmt -o nb/LC_MESSAGES/myproject.mo nb.po
29 Now you can compare the output in different locales:
31 LANG=C perl process-template.pl
32 LANG=nb_NO.UTF-8 perl process-template.pl
34 Whenever you change your templates and/or in-code strings, simply recreate
35 the templates from scratch and run
37 msgmerge -U nb.po templates.pot
39 Then unfuzz, translate new strings and run msgfmt again.
41 Everything in here is © 2005 Steinar H. Gunderson <sgunderson@bigfoot.com>,
42 licensed under the GPLv2. Absolutely no warranty. Comments welcome :-)