#!/bin/sh
# traduction de anglais à français (si 0, c'est l'inverse)
VERSION="en|fr"
help() {
echo "Traduction Anglais/Français";
echo "Utilisation : $0 [OPTIONS] [MOT]";
echo "";
echo "Options :"
echo " -enfr : mode Anglais->Français (par défaut)";
echo " -fren : mode Français->Anglais";
exit 1;
}
if [ $# -eq 0 ]; then
help
fi
while [ $# -ge 1 ]; do
case $1 in
-h|--help)
help
;;
-fren)
VERSION="fr|en"
;;
-enfr)
VERSION="en|fr"
;;
*)
MOT=$@
;;
esac
shift
done
MOT_TRADUIT=`lynx -source "http://translate.google.com/translate_t?text=${MOT}