URL function with i18n localization

View: New views
4 Messages — Rating Filter:   Alert me  

URL function with i18n localization

by Mukesh Agarwal-2 :: Rate this Message:

| View Threaded | Show Only this Message

Hi Guys,

I'm using rate module for voting. When an anonymous user clicks on the voting widget, the user is redirected to a url "user/login-to-rate". I'm also using i18n for localization. The issue with both of these together is that when I'm on a page with the URL "en/my-url" and I click on the voting widget, I'm redirected to "de/user/login-to-rate" where "de" is my default language. Ideally the user should be going to "en/user/login-to-rate" i.e. user selected language should be respected.

Going into details, I find that the rate module calls url function:

print url('user/login-to-rate', array('query' => $query, 'absolute' => TRUE));

and here there is no language paramater that is passed which means the default site language gets selected. 

Am I missing something here in the configuration? Has anyone faced a similar problem and can help?

--
Cheers,
Mukesh Agarwal
________________________________
Innoraft Solutions  || +91 8017220799


Re: URL function with i18n localization

by Karen Stevenson :: Rate this Message:

| View Threaded | Show Only this Message

If you're having a problem with a specific module, the obvious place to start is on that module's issue queue. A quick search of that issue queue turned up this: http://drupal.org/node/1354464. You can try that patch and respond on that issue about whether it worked.

This list is already abused. I personally disagree that only core issues should be discussed here, but it definitely should not be a place to post questions that could be answered by looking at the issue queues of the modules in question. There are 14,000 modules on Drupal.org. If this list becomes a substitute issue queue for all 14,000 modules, it will become so noisy that everyone that might be able to help solve more difficult problems will quickly quit using it.

I am trying to say this kindly, assuming you didn't know any better, but please use the issue queues :)

Karen

On Tue, Mar 13, 2012 at 6:51 AM, Mukesh Agarwal <mukesh.agarwal17@...> wrote:
Hi Guys,

I'm using rate module for voting. When an anonymous user clicks on the voting widget, the user is redirected to a url "user/login-to-rate". I'm also using i18n for localization. The issue with both of these together is that when I'm on a page with the URL "en/my-url" and I click on the voting widget, I'm redirected to "de/user/login-to-rate" where "de" is my default language. Ideally the user should be going to "en/user/login-to-rate" i.e. user selected language should be respected.

Going into details, I find that the rate module calls url function:

print url('user/login-to-rate', array('query' => $query, 'absolute' => TRUE));

and here there is no language paramater that is passed which means the default site language gets selected. 

Am I missing something here in the configuration? Has anyone faced a similar problem and can help?

--
Cheers,
Mukesh Agarwal
________________________________



Re: URL function with i18n localization

by Mukesh Agarwal-2 :: Rate this Message:

| View Threaded | Show Only this Message

Thanks for the response Karen. I agree, I should have posted this in the issue queue first. The link that you have sent is different from what my problem is. I did a search on drupal forums, stackexchange but unfortunately could not find an answer and therefore ended up sharing it on the mailing list. 

Anyways, if you think this is not the right place, please share your thoughts at stackexchange -- http://drupal.stackexchange.com/questions/25356/url-function-with-i18n-localization

Will post this as issue and share the link. 

On Tue, Mar 13, 2012 at 6:40 PM, Karen Stevenson <karen@...> wrote:
If you're having a problem with a specific module, the obvious place to start is on that module's issue queue. A quick search of that issue queue turned up this: http://drupal.org/node/1354464. You can try that patch and respond on that issue about whether it worked.

This list is already abused. I personally disagree that only core issues should be discussed here, but it definitely should not be a place to post questions that could be answered by looking at the issue queues of the modules in question. There are 14,000 modules on Drupal.org. If this list becomes a substitute issue queue for all 14,000 modules, it will become so noisy that everyone that might be able to help solve more difficult problems will quickly quit using it.

I am trying to say this kindly, assuming you didn't know any better, but please use the issue queues :)

Karen


On Tue, Mar 13, 2012 at 6:51 AM, Mukesh Agarwal <mukesh.agarwal17@...> wrote:
Hi Guys,

I'm using rate module for voting. When an anonymous user clicks on the voting widget, the user is redirected to a url "user/login-to-rate". I'm also using i18n for localization. The issue with both of these together is that when I'm on a page with the URL "en/my-url" and I click on the voting widget, I'm redirected to "de/user/login-to-rate" where "de" is my default language. Ideally the user should be going to "en/user/login-to-rate" i.e. user selected language should be respected.

Going into details, I find that the rate module calls url function:

print url('user/login-to-rate', array('query' => $query, 'absolute' => TRUE));

and here there is no language paramater that is passed which means the default site language gets selected. 

Am I missing something here in the configuration? Has anyone faced a similar problem and can help?

--
Cheers,
Mukesh Agarwal
________________________________





--
Cheers,
Mukesh Agarwal
________________________________
Innoraft Solutions  || +91 8017220799


Re: URL function with i18n localization

by Mukesh Agarwal-2 :: Rate this Message:

| View Threaded | Show Only this Message

Here goes the link on d.o. forum -- http://drupal.org/node/1480376

On Tue, Mar 13, 2012 at 6:45 PM, Mukesh Agarwal <mukesh.agarwal17@...> wrote:
Thanks for the response Karen. I agree, I should have posted this in the issue queue first. The link that you have sent is different from what my problem is. I did a search on drupal forums, stackexchange but unfortunately could not find an answer and therefore ended up sharing it on the mailing list. 

Anyways, if you think this is not the right place, please share your thoughts at stackexchange -- http://drupal.stackexchange.com/questions/25356/url-function-with-i18n-localization

Will post this as issue and share the link. 


On Tue, Mar 13, 2012 at 6:40 PM, Karen Stevenson <karen@...> wrote:
If you're having a problem with a specific module, the obvious place to start is on that module's issue queue. A quick search of that issue queue turned up this: http://drupal.org/node/1354464. You can try that patch and respond on that issue about whether it worked.

This list is already abused. I personally disagree that only core issues should be discussed here, but it definitely should not be a place to post questions that could be answered by looking at the issue queues of the modules in question. There are 14,000 modules on Drupal.org. If this list becomes a substitute issue queue for all 14,000 modules, it will become so noisy that everyone that might be able to help solve more difficult problems will quickly quit using it.

I am trying to say this kindly, assuming you didn't know any better, but please use the issue queues :)

Karen


On Tue, Mar 13, 2012 at 6:51 AM, Mukesh Agarwal <mukesh.agarwal17@...> wrote:
Hi Guys,

I'm using rate module for voting. When an anonymous user clicks on the voting widget, the user is redirected to a url "user/login-to-rate". I'm also using i18n for localization. The issue with both of these together is that when I'm on a page with the URL "en/my-url" and I click on the voting widget, I'm redirected to "de/user/login-to-rate" where "de" is my default language. Ideally the user should be going to "en/user/login-to-rate" i.e. user selected language should be respected.

Going into details, I find that the rate module calls url function:

print url('user/login-to-rate', array('query' => $query, 'absolute' => TRUE));

and here there is no language paramater that is passed which means the default site language gets selected. 

Am I missing something here in the configuration? Has anyone faced a similar problem and can help?

--
Cheers,
Mukesh Agarwal
________________________________





--
Cheers,
Mukesh Agarwal
________________________________
Innoraft Solutions  || +91 8017220799




--
Cheers,
Mukesh Agarwal
________________________________
Innoraft Solutions  || +91 8017220799