]> git.sesse.net Git - ttk-gettext/blobdiff - README
Add all the files.
[ttk-gettext] / README
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..bf4aa66
--- /dev/null
+++ b/README
@@ -0,0 +1,35 @@
+Preliminary notes. (Note that all of this has already been done for you
+in the archive, this is mainly so you can see what to do in your own
+projects.)
+
+Create the individiual .pot template files by using:
+
+  baby:~/ttk-gettext--mainline--1.0> perl make-pot.pl test.tmpl | msguniq > tpl-test.pot
+  (repeat for multiple templates)
+  xgettext --keyword=_ --from-code=utf-8 -o messages.pot -L perl *.pl
+  
+Merge them all together using msgcat:
+
+  msgcat *.pot > templates.pot
+
+Now you can actually start translating. Do a msginit as usual:
+
+  LANG=nb_NO.UTF-8 msginit --input templates.pot
+
+And then translate using the editor of your choice. kbabel is a popular choice,
+but you can use your favourite editor by using potool:
+
+  poedit nb.po
+
+And then compile it using msgfmt as usual:
+
+  mkdir -p nb/LC_MESSAGES
+  msgfmt -o nb/LC_MESSAGES/myproject.mo nb.po
+
+Now you can compare the output in different locales:
+
+   LANG=C perl process-template.pl 
+   LANG=nb_NO.UTF-8 perl process-template.pl 
+
+Everything in here is © 2005 Steinar H. Gunderson <sgunderson@bigfoot.com>,
+licensed under the GPLv2. Absolutely no warranty. Comments welcome :-)