【发布时间】:2013-04-01 11:27:28
【问题描述】:
我有一个 HorseController 及其 Index 方法,例如:
[GET("Index", TranslationKey = "HorseIndex")]
[AllowAnonymous]
public ActionResult Index(int? page, HorseTypes? type, HorseGenders? gender, HorseBreeds? breed, HorseJumps? jump,
HorseDressages? dressage, String maxAge, String priceFrom, String priceTo, Country? country, bool? hasPicture, bool? hasVideo)
{
...
}
我把这条路线翻译成这样:
provider.AddTranslations()
.ForKey("HorseIndex", new Dictionary<string, string>
{
{ "da", "heste-til-salg" },
{ "en", "horses-for-sale" }
})
问题是,现在丹麦用户的网址是:
http://localhost:12623/heste-til-salg?page=1&hasPicture=False&hasVideo=False
我的问题也是如何翻译查询参数?
我在documentation 中找不到这个。
【问题讨论】:
标签: asp.net-mvc attributerouting