d4e540d
.TH tmserver 1 "Translate Toolkit 1.3.0" "" "Translate Toolkit 1.3.0"
d4e540d
.SH NAME
d4e540d
tmserver \- a Translation Memory server,
d4e540d
.SH SYNOPSIS
d4e540d
\fBtmserver\fP \fB--bind\fP=\fIHOSTNAME\fP \fB--port\fP=\fIPORT\fP
d4e540d
[\fB--tmdb\fP=\fITMDBFILE\fP]
d4e540d
[\fB--import-translation-file\fP=\fITMFILE\fP
d4e540d
[\fB--import-source-lang\fP=\fISOURCE_LANG\fP]
d4e540d
[\fB--import-target-lang\fP=\fITARGET_LANG\fP]]
d4e540d
d4e540d
Where \fITMDBFILE\fP is the sqlite database file containing tmdb translation
d4e540d
memory data, if not specified a new temporary database is created, and
d4e540d
\fITMFILE\fP is a translation file (po, xliff, etc.) that should be imported
d4e540d
into the database (mostly useful when no tmdb file is specified).
d4e540d
d4e540d
.SH DESCRIPTION
d4e540d
\fBtmserver\fP is a Translation Memory service that can be queried via
d4e540d
HTTP using a simple REST like URL/http and data is exchanged between
d4e540d
server and client encoded in JSON.
d4e540d
.SH OPTIONS
d4e540d
.TP
d4e540d
\fB-h\fP, \fB--help\fP
d4e540d
show this help message and exit
d4e540d
.TP
d4e540d
\fB-d\fP \fITMDBFILE\fP, \fB--tmdb\fP=\fITMDBFILE\fP
d4e540d
translation memory database
d4e540d
.TP
d4e540d
\fB-f\fP \fITMFILES\fP, \fB--import-translation-file\fP=\fITMFILE\fP
d4e540d
translation file to import into the database
d4e540d
.TP
d4e540d
\fB-t\fP \fITARGET_LANG\fP, \fB--import-target-lang\fP=\fITARGET_LANG\fP
d4e540d
target language of translation files
d4e540d
.TP
d4e540d
\fB-s\fP \fISOURCE_LANG\fP, \fB--import-source-lang\fP=\fISOURCE_LANG\fP
d4e540d
source language of translation files
d4e540d
.TP
d4e540d
\fB-b\fP \fIBIND\fP, \fB--bind\fP=\fIHOSTNAME\fP
d4e540d
address to bind server to
d4e540d
.TP
d4e540d
\fB-p\fP \fIPORT\fP, \fB--port\fP=\fIPORT\fP
d4e540d
port to listen on
d4e540d
.SH EXAMPLE
d4e540d
The easiest way to run the server for testing is to pass it a large
d4e540d
translation file (maybe generated by \fBpocompendium\fP) to create a tmdb
d4e540d
database on the fly.
d4e540d
d4e540d
.B tmserver -b localhost -p 8080 -f compendium.po -s en_US -t ar
d4e540d
d4e540d
The server can be queried using a webbrowser. The url would be
d4e540d
http://HOST:PORT/tmserver/SOURCE_LANG/TARGET_LANG/unit/STRING
d4e540d
d4e540d
So to see suggestions for "open file" try the url
d4e540d
http://localhost:8080/tmserver/en_US/ar/unit/open+file
d4e540d