Difference between revisions of "Translating gettext"

From Apertium
Jump to navigation Jump to search
m
Line 1: Line 1:
  +
==pospell==
 
A combination of <code>pospell</code> and Apertium can be used to translate gettext <code>.po</code> files.
 
A combination of <code>pospell</code> and Apertium can be used to translate gettext <code>.po</code> files.
   
 
<code>pospell</code> is part of the <code>spellutils</code> package, available through apt-get, macports, emerge, urpmi...
 
<code>pospell</code> is part of the <code>spellutils</code> package, available through apt-get, macports, emerge, urpmi...
   
==Example==
+
===Example===
 
 
<pre>
 
<pre>
 
$ cat sv.po | pospell -n - -f -p apertium -- sv-da -u > da.po
 
$ cat sv.po | pospell -n - -f -p apertium -- sv-da -u > da.po
 
</pre>
 
</pre>
 
   
 
Thus if you put
 
Thus if you put
Line 21: Line 20:
 
</pre>
 
</pre>
   
  +
==Pology==
-----
 
 
 
You can also use the Python package [http://techbase.kde.org/Localization/Tools/Pology Pology]. Follow the instructions on the link to set it up, then do something like
 
You can also use the Python package [http://techbase.kde.org/Localization/Tools/Pology Pology]. Follow the instructions on the link to set it up, then do something like
 
<pre>
 
<pre>
Line 28: Line 26:
 
</pre>
 
</pre>
   
  +
==Virtaal==
-----
 
 
 
Or you could just use the .po file editor [http://translate.sourceforge.net/wiki/virtaal/index Virtaal], which has an [http://translate.sourceforge.net/wiki/virtaal/apertium Apertium plugin].
 
Or you could just use the .po file editor [http://translate.sourceforge.net/wiki/virtaal/index Virtaal], which has an [http://translate.sourceforge.net/wiki/virtaal/apertium Apertium plugin].
  +
   
 
==See also==
 
==See also==

Revision as of 20:54, 22 November 2009

pospell

A combination of pospell and Apertium can be used to translate gettext .po files.

pospell is part of the spellutils package, available through apt-get, macports, emerge, urpmi...

Example

$ cat sv.po | pospell -n - -f -p apertium -- sv-da -u > da.po

Thus if you put

#!/bin/sh
pospell -n - -f -p apertium -- -u "$@"

into a file called eg. "apertium-po", and chmod +x apertium-po, you can do

$ cat sv.po | apertium-po sv-da > da.po

Pology

You can also use the Python package Pology. Follow the instructions on the link to set it up, then do something like

 $ pomtrans -f sv -t da -a"&" apertium da.po 

Virtaal

Or you could just use the .po file editor Virtaal, which has an Apertium plugin.


See also