1
Good Guys I’m wanting to translate a text with php but I can’t find a functional api. I tried to make it work this way
<html>
<head>
<title>Teste</title>
</head>
<body>
<form action="#" >
<textarea name="texto"></textarea>
<input type="submit" value="Traduzir"/>
</form>
<?php
$texto = $_POST['texto'];
$language = "pt_BR";
$language_for= "en";
if($texto != NULL){
//aqui a tradução
}else{
echo "Sem Texto Para Traduzir";
}
?>
</body>
</html>
How can I make this work? PS: I need this text to be translated with the help of some api due to the text being picked up randomly on another site.
I will use a host, it will be possible to install it on the host?
– Carlos da Silva
@Carlosdasilva downloads the project from the host to your machine, installs the Composer on your machine, installs it with the command I sent, adds the autoload.php adjusts the codes as in the example and sends it back to your HOST via FTP.
– Guilherme Nascimento
Ah ta got to understand Poser is a tool that assists in installing the package from github
– Carlos da Silva
@Carlosdasilva is yes, as I indicated on https://getcomposer.org/, I recommend that before you change anything in your project I study Composer very well, today it is rare who does not use Composer in more serious projects, only some do not use Composer, who does not know what it is when the project is very simple. Just for the record, Poser is not something you learn overnight, unless you’ve had experience with PIP, NPM or similar tools, so if you don’t understand Poser still recommend reading very calmly and carefully and back up your project.
– Guilherme Nascimento
I’ve used NPM, I’m coming back here just to inform you that I got what I wanted. I thank you the same
– Carlos da Silva