9

Client wants some CMS text to be automatically translated. So I checked and Google seems to have a solution for that. I thought to to be as simpel as doing a request and parsing the response. That's how API's work, right?

No. First I must create an account, that account must have a credit card, then I need to setup credentials, the default ones working with path variables, an API key... etc etc etc.

I feel so stupid for just not understanding their docs. I'm just a dude that installs a CMS and makes pretty CSS for it. I've worked with REST APIs before (Mollie, Carerix) but none of them ever demanded the level of knowledge and setup the Google Translate API demands.

Am I just a bad developer or is this shit just too complex for your average web developer?

Comments
  • 7
    Has your client ever used an auto translated page?

    Or lemme guess, they're American and don't actually know how horrible auto translated webpages actually are
  • 3
    Usually task like that is solved with static translation. Trivial task for frontend frameworks... A bit less trivial but still possible for some backend Frameworks.
    For CMS it is not trivial at all unless it has this feature in advance xD
  • 7
    Have you checked Deepl before ?

    https://deepl.com/en/pro-api/...

    Should be easier than google and you probably get better translations out of it.
  • 2
    @Grumm I have not, but thank you... I am surely interested in any simpler alternative!
  • 3
    @LotsOfCaffeine No, the client is Dutch. He's just too lazy/cheap to do the translations manually.
  • 4
    @darkwind With our CMS it's actually quite trivial to make a site multi-language... the client just wants it automated and doesn't care about quality.
  • 2
    @Inxentas there are APIs and then there are APIs...

    - making an API a paid system requires adding a payment API
    - payment API requires authentication
    - authentication requires auditing
    - auditing / authentication / payments require security knowledge and checks
    - internationalization requires compliance with laws
    - compliance with laws may have additional requirements regarding e.g. treatment of data (GDPR as an example)… working with authorities (tax handling as an example)

    I could go on - but I guess you'll get the gist.

    It entirely depends on the features the API has integrated, sometimes even a seemingly small thing can have a full monty of dependencies and complexity you may not be aware of.

    I took the example of payment API as it is one of the things that really make things "difficult".

    OpenSource APIs who do not need to be paid for are usually more trivial as this large block is missing.

    At worst you'll get the stinky finger in form of 429 / too many requests.

    The other thing one should be aware of is that Google is a company with layers of layers of layers of APIs.

    It's an entirely different thing, as most of the stuff is designed by Google for the whole Google (or nowadays Alphabet) ecosystem.

    Different to an API where you have an account just for the service alone.

    An account for Google APIs usually gives you access to all kinds of Google stuff....

    OAuth 2 makes it easier, but it's not a full blessing either. :)

    So don't be too harsh on yourself - most FAANG APIs stem from internal work on an preexisting ecosystem... Then that internal work was made public, which made it accessible for everyone, but as it's deeply integrated into the ecosystem, it's far more complicated than it has to be.
  • 0
    @IntrusionCM I thought the same until he said that he did integrate Mollie. That is a paid payment gateway. Now there might have been a CMS plugin that handled a lot of the complexity or it is just way simpler because that is the selling point.

    I know for a fact AWS has extremely complicated shit where you need an signature with HMAC etc just to send a e-mail. Doing payments is way easier WTF.
    https://docs.aws.amazon.com/general...
  • 0
    @hjk101 To be fair implementing Mollie itself is a breeze. Just add up all the costs, make an API call, read the result. It seems strange to me I used to fear payment API's for their authentication shenanigans, overcame that fear, and now run into the realization that Google is either hunting for my data, uber-paranoid about who translates what, or just plain fucking with us all.
Add Comment