espresto/reclaim-social-media

Twitter's language setting is hardcoded to german

Closed this issue · 6 comments

From twitter.class.php:
6: private static $lang = 'de';

This setting should probably be retrieved from WordPress or (if that's not possible) at least become a global Reclaim setting. If uncertain, "en" seems like a saner default.

The default is now "en". The ticket is still valid, though, we shouldn't make such an assumption and instead query Wordpress's config if possible.

wp-config.php defines a constant:

define('WPLANG', 'de_DE');

we can use the first two characters.

Nice. Do you know if Twitter's API fallback is to "en" for languages they don't know? If they return an HTTP 400 instead, we might have to whitelist languages on our side.

according to the docs, there is no lang parameter at all:
https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline

however, there are other APIs that to honor a language setting. like facebook.class.php

Huh, ain't that something. I could swear I've seen some german helper texts imported, but maybe that was G+ or Facebook then.

Still seeing a few (direct) german strings in the project, but those warrant separate tickets. Closing this one.