-
Notifications
You must be signed in to change notification settings - Fork 13
Change culture parameter name #48
Comments
Yes you are right. The culture parameter is just added to the defaults collection of the inner route:
Depending on what you need you could modify the defaults afterwards... why do you want to change that? |
I am asking because sometimes it is needed to have another culture parameter for an API so changing the one used by RL would be useful ... Maybe a property on setup? Something like:
Another useful feature would be to control the position of the culture parameter. I think at the moment Route Localization create the routes as follows:
It would be greate to use also:
Where API is a RoutePrefix. |
The culture parameter has nothing todo with the routeprefix within the url - the culture parameter also exists if you don't use route prefix. I also wouldn't see it as parameter, it is more a "constant" which is added to the route, so you can use it to query the current culture. You are right for the RoutePrefix position, what options are there?
Anything else? |
I think the 4 options you suggested are enough. That would be great because en/api does not sound right ... but api/en does. |
Added a separate issue for that. Back to the culture "parameter" naming. How do you use it at the moment and when do you need to rename it? If I understand your use case, it may be easier to come up with a solution. |
Consider you have this:
Wouldn't this interfere with the culture parameter? Another example is a project I received a few weeks ago where Language is used in every place of the project but in RL I must use culture (for example, when changing culture). Having the option to use language as the localization parameter might be useful ... Again, this is not so important ... I asked because I came up with these situations and if I am not mistaken, in Attribute Routing from Tim McCall, there was an option to define the name of that parameter? Maybe it might be useful because of other reasons ... |
I see. I'll consider it for the next update. |
Hello,
If I am not wrong the parameter that holds the current culture is "culture", right?
Is it possible to change the name of this parameter?
Thank You,
Miguel
The text was updated successfully, but these errors were encountered: