Skip to content

add internationalisation support #45

Closed
gasova opened this Issue Jan 13, 2013 · 9 comments

2 participants

@gasova
gasova commented Jan 13, 2013

How can I set the parameter lang=tr like this:

https://api.twitter.com/oauth/authenticate?lang=tr&oauth_token=

as my clients are turkish and they want Twitter in turkish?

Can you help me?

Kind Regards.

@gasova
gasova commented May 12, 2013

nobody to help for internationalisation support?

@gasova
gasova commented Jul 1, 2013

Please can anyone help ?

@guilhermesimoes

Try this:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :twitter, "TWITTER_KEY", "TWITTER_SECRET",
    {
      :authorize_params => {
        :lang => 'tr'
      }
    }
end

Although this isn't dynamic... I'll try to fix that in a pull request soon.

And you should try not to open multiple issues if they're about the same thing.

@gasova
gasova commented Jul 2, 2013

Hello, I've tryed the solution above but it is not working :(

@guilhermesimoes

Did you restart your app? Usually when you make changes to files inside the config directory you have to restart your app.

@gasova
gasova commented Jul 2, 2013
@guilhermesimoes

I just tried it now and it works so you are doing something wrong. Try updating the gem with bundle update omniauth-twitter and make sure that you are adding

:authorize_params => {
  :lang => 'tr'
}

To wherever it is where you are passing your key and secret.

@gasova
gasova commented Jul 2, 2013
@gasova
gasova commented Jul 3, 2013

I've finaly succeeded. It was a twitter app setup issue... each time my authenticate callback was redirected by twitter to authorize, because of the setting "Allow this application to be used to Sign in with Twitter" that wasn't checked, in my twitter app settings page...

Kind regards

@gasova gasova closed this Jul 3, 2013
@guilhermesimoes guilhermesimoes added a commit to guilhermesimoes/omniauth-twitter that referenced this issue Aug 5, 2013
@guilhermesimoes guilhermesimoes Add i18n support.
Pass the `lang` param to the auth request to dynamically set the language
of the Twitter prompt:
/auth/twitter?lang=pt

The language of the prompt could already be initially set in the OmniAuth
config with:
:authorize_params => { :lang => 'pt' }

Fix #45
de43f25
@guilhermesimoes guilhermesimoes added a commit to guilhermesimoes/omniauth-twitter that referenced this issue Aug 5, 2013
@guilhermesimoes guilhermesimoes Add i18n support.
You can now pass the `lang` param to the auth request to dynamically set
the language of the Twitter prompt:
/auth/twitter?lang=pt

The language of the prompt could already be initially set in the OmniAuth
config with:
:authorize_params => { :lang => 'pt' }

Fix #45
2fb92d7
@guilhermesimoes guilhermesimoes added a commit to guilhermesimoes/omniauth-twitter that referenced this issue Aug 5, 2013
@guilhermesimoes guilhermesimoes Add i18n support.
You can now pass the `lang` param to the auth request to dynamically set
the language of the Twitter prompt:
/auth/twitter?lang=pt

The language of the prompt could already be initially set in the OmniAuth
config with:
:authorize_params => { :lang => 'pt' }

Fix #45
e2985a6
@guilhermesimoes guilhermesimoes added a commit to guilhermesimoes/omniauth-twitter that referenced this issue Aug 5, 2013
@guilhermesimoes guilhermesimoes Add i18n support.
You can now pass the `lang` param to the auth request to dynamically set
the language of the Twitter prompt:
/auth/twitter?lang=pt

The language of the prompt could already be initially set in the OmniAuth
config with:
:authorize_params => { :lang => 'pt' }

Fix #45
a50b18c
@guilhermesimoes guilhermesimoes added a commit to guilhermesimoes/omniauth-twitter that referenced this issue Aug 6, 2013
@guilhermesimoes guilhermesimoes Add i18n support.
We can now pass the `lang` param to the auth request to dynamically set
the language of the Twitter prompt:
/auth/twitter?lang=pt

The language of the prompt could already be initially set in the OmniAuth
config with:
:authorize_params => { :lang => 'pt' }

Fix #45
75ef75f
@guilhermesimoes guilhermesimoes added a commit to guilhermesimoes/omniauth-twitter that referenced this issue Aug 25, 2013
@guilhermesimoes guilhermesimoes Add i18n support.
We can now pass the `lang` param to the authorization url to dynamically
set the language of the Twitter prompt:
/auth/twitter?lang=pt

The default language of the prompt could already be set in the OmniAuth
config with:
:authorize_params => { :lang => 'pt' }

Fix #45
c4d6570
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.