Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For consideration: Add explicit support for globalized routes #14

Closed
utilityboy opened this issue Aug 26, 2011 · 5 comments
Closed

For consideration: Add explicit support for globalized routes #14

utilityboy opened this issue Aug 26, 2011 · 5 comments

Comments

@utilityboy
Copy link

Hi,

First off, this is a great library. Thanks so much for the investment of time and effort... very well put together.

Earlier this week I spent a bunch of time faffing around with culture switching based on locale route parameters. Any thoughts on adding some defaults into your library to help with this?

I'm a little crunched for time right now, but if you think it's a good idea, I wouldn't mind throwing a few hours towards a nice implementation.

Thanks again,

...brent

@mccalltd
Copy link
Owner

Thanks Brent,

So you want to get a route param with culture info and then switch the culture of the current thread, yes?

From what I understand about changing the culture in the current thread, it might be too late to do that by the time AR handles a request. Usually I've set culture stuff for the thread in the Application_BeginRequest method in global.asax. There you'd have access to the current request and could pick off query string params, user languages, etc.

I had spiked out a localization solution, which I am not sure would be relevant here. You can view the localization branch in the github repo if you would like.

Let me know if I am missing the point.

t

On Aug 26, 2011, at 11:39 AM, bjubinville wrote:

Hi,

First off, this is a great library. Thanks so much for the investment of time and effort... very well put together.

Earlier this week I spent a bunch of time faffing around with culture switching based on locale route parameters. Any thoughts on adding some defaults into your library to help with this?

I'm a little crunched for time right now, but if you think it's a good idea, I wouldn't mind throwing a few hours towards a nice implementation.

Thanks again,

...brent

Reply to this email directly or view it on GitHub:
#14

@utilityboy
Copy link
Author

It's true, with web apps you would set the culture in BeginRequest traditionally, but I've done a little work on a decent looking solution that I'm happy to share (and that I think my have a place here). I'll get back to you in a couple weeks with some more discussion points. Thanks for the response.

@mccalltd
Copy link
Owner

mccalltd commented Dec 8, 2011

Any progress? Would like to include localization support but have been slammed recently with a job, of all things.

@utilityboy
Copy link
Author

Sadly, I'm in the same boat. It's still on my list to look at, but I can't say when I'll be able to get a chance.

@mccalltd
Copy link
Owner

I just added the first crack at localization support in v1.5, now available on nuget. FYI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants