Wednesday, 21 August 2013

Twitter API doesn't seem to have any language support

Twitter API doesn't seem to have any language support

How do you set a specific locale/language when using the PHP API for
Twitter, as there doesn't seem to be an option?
I can set a language for the plugins/buttons when using HTML/JavaScript,
but I can't see anywhere for a PHP API call. There's nothing in the docs.
E.g. I've looked on https://dev.twitter.com/docs/api/1.1 but there's
nothing about setting a language. The responses often include a language,
but that's obviously not the same thing.
As an example, when getting info of a user in a PHP API call, Facebook's
API will return 'male' or 'homme' if the user's sex is male, depending on
if the language is set to English or French (default English).
Of course sometimes you want to always return English in an API call if
your programming code relies on testing for 'male' or 'female', but if
you're just outputting the exact response of the sex field (e.g. a user
profile) then you would want to use the same language as the rest of the
site.

No comments:

Post a Comment