google-translate-php
google-translate-php copied to clipboard
Brazilian Portuguese translation error
There is a difference in the Brazilian translation. I'm using the following encoding:
$tr = new GoogleTranslate(); $tr->setSource('en'); $tr->setTarget('pt-BR'); echo $tr->translate('Like a platypus. Only you mumbled in your sleep.');
Wrong result: 'Como um ornitorrinco. Só você murmurou em seu sono.' Correct result: 'Como um ornitorrinco. Só você murmurou enquanto dormia.'
Image from Google translator: https://i.ibb.co/hcPb06T/Capturar.png
I believe that I am not picking up Brazilian Portuguese, but from Portugal.
Which version of this package are you using?
In my composer it has:
{
"require": {
"stichoza/google-translate-php": "^4.1"
}
}
Did you see this problem?
pt-BR
is not in the list of supported languages. You can see in your screenshot that browsers address bar has pt
instead of pt-BR
.
I don't know what has changed on Google's side but the text you provided is translated with "em seu sono" on Google Translate web app too:

I'll reopen this issue if you can replicate this problem. Let me know if the translation by this package will be different from Google Translate web app.