VICUG-L Archives

Visually Impaired Computer Users' Group List

VICUG-L@LISTSERV.ICORS.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
peter altschul <[log in to unmask]>
Reply To:
peter altschul <[log in to unmask]>
Date:
Wed, 22 Feb 2012 11:03:55 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (161 lines)
 ---- Original Message ------
From: Jamal Mazrui <[log in to unmask]
Subject: TranLang 2.0 released - translate between languages via 
the Microsoftweb service
Date sent: Wed, 22 Feb 2012 11:19:06 -0500

Now available at

http://EmpowermentZone.com/TranLang.zip

TranLang was originally released in 2009.  Version 2.0 now 
switches from
use of the Perl language and the Google API to C# and the 
Microsoft API,
since the free Google API was discontinued.  Thanks go to Rick 
USA for
sample code demonstrating the Microsoft Translator API.  The 
program now
requires the .NET Framework 4.0 to be installed (a free download 
from
microsoft.com if not already present on the computer).  The updae 
also
adds console-mode input and output as an alternative to 
file-based
processing.

Documentation is as follows:

TranLang
Version 2.0
February 22, 2012
Copyright 2008 - 2012 by Jamal Mazrui
GNU Lesser General Public License (LGPL)
----------


Contents

Description
Operation
Change Log
Development Notes
----------


Description

TranLang is a free, open source program for Translating or 
detecting
Languages via the Microsoft API.  The executable, TranLang.exe, 
is a
console-mode utility that may either be operated manually at a 
command
prompt, or be called by other programs to perform translation 
tasks.
----------


Operation

Unzip the distribution archive, TranLang.zip, into a directory, 
e.g., into
C:\TranLang

Then run the executable, TranLang.exe, either from that directory 
or by
specifying its path.  Running TranLang.exe with no parameters 
will print
a help message to the console screen.

To translate between languages, there are four possible 
parameters
specifying the type and content of source and target languages.  
The
full syntax is

TranLang.exe SourceLanguage SourceFile TargetLanguage TargetFile

SourceFile contains the text to be translated, which has an upper 
limit
of about 1000 characters.  TargetFile contains the result, if 
successful.

To detect an unknown language, the syntax is
TranLang.exe SourceFile TargetFile

SourceFile contains the text of the unknown language.  TargetFile
contains the language detected.

More syntax options are as follows:

To translate text from a source to target language
TranLang.exe SourceLanguage SourceFile TargetLanguage TargetFile

To do the same except detect and omit the SourceLanguage
TranLang.exe SourceFile TargetLanguage TargetFile

To detect and report the SourceLanguage
TranLang.exe SourceFile TargetFile

To report a list of about 40 available languages and their codes
TranLang.exe TargetFile

The program assumes UTF-8 encoding for the input or output file.  
To
work with console- rather than file-based input and output, 
replace the
name of SourceFile with actual SourceText, and omit the 
TargetFile
parameter.  For example,
TranLang.exe "Hello world"

will report the language detected to the console as
English = en

or
TranLang.exe "Hello world" fr

will report the French translation to the console as
Salut tout le monde

Note that if a space is contained in a command-line parameter, it 
should
be enclosed in quotes.  Also note that a language may be 
specified
either by its name or two-letter abbreviation, e.g., either 
English or
en, and that capitalization of the language does not matter.
----------


Development Notes

The latest version of TranLang is available at
http://EmpowermentZone.com/TranLang.zip

This documentation is also directly available online at
http://EmpowermentZone.com/TranLang.htm

Source code is available in the files TranLang.cs and Private.cs.  
To
recompile a working version of the program, one must modify 
Private.cs
so that it contains a valid app ID, which may be freely obtained 
from
http://MicrosoftTranslator.com

I welcome feedback, which helps TranLang improve over time.  When
reporting a problem, the more specifics the better, including 
steps to
replicate it, if possible.
----------
End of Document


    VICUG-L is the Visually Impaired Computer User Group List.
Archived on the World Wide Web at
    http://listserv.icors.org/archives/vicug-l.html
    Signoff: [log in to unmask]
    Subscribe: [log in to unmask]

ATOM RSS1 RSS2