Getting full language support with Twitter buttons isn't possible
I'm trying to work out how to do full language control with Twitter
because I have most of it, but I don't think it's possible in full. This
isn't a newbe question, I think there's a big problem with Twitter.
So imagine I'm trying to set the French language and using this:
<a href="https://twitter.com/username" class="twitter-follow-button">View
Profile</a>
I have done this:
(1) Set the language in the document
<html lang="fr" />
(2) Added the ?lang=fr parameter so that if JavaScript is off then the
fallback (just a text link) opens the profile with the correct language:
<a href="https://twitter.com/username?lang=fr"
class="twitter-follow-button">View Profile</a>
(3) Added the data-lang="fr" attribute as well:
<a href="https://twitter.com/username?lang=fr" data-lang="fr"
class="twitter-follow-button">View Profile</a>
--
So the questions:
(1) Everything works except if JavaScript runs and you click to open a
page on twitter.com it never uses the language. So, basically you could
have a French website with French language, French Twitter buttons, but
when you click a button it always uses English language on twitter.com
(unless you turn off JavaScript).
Is it not possible for links to open twitter.com?lang=fr
(2) Is there not an easy way to do this all in one place? In Facebook you
just call the API script by selecting the language you want, but that
doesn't seem possible with Twitter and it seems very time consuming
appending all the extras just to get a different language.
No comments:
Post a Comment