3

I already know how to localize an ASP.NET MVC3 URL (using this technique).

This solution is very elegant and i already managed to tweak it to my needs.

But now i have this small (or rather huge) problem:

how is it possible to have localized url query parameters?

For example how is it possible to have this (US) english version

english URL: http://www.mysite.com/en-US/Classifieds/Search?ZipCode=92274

german (DE) version: http://www.mysite.com/de-DE/Anzeigen/Suche?Postleitzahl=71710

spanish (ES) vesrion: http://www.mysite.com/es-ES/Clasificados/Busqueda?Codigo_postal=08110

See the bolded part? This is what i'm looking for!

Thanks in advance

PS. I need this cause i think this will give much better SEO rankings. Is there anyone who can confirm this?

Savvas Sopiadis
  • 8,213
  • 10
  • 34
  • 53

1 Answers1

0

I can think of several ways of doing what you need. You may want to try to create your own HTML helper for localized links building. That could include the translation logic based on db table ( baseName, Culture, translation ). Once you've got this in place you either could refer to Request object and get the parameter by index, or create a logic to translate back ( again based on your table) to the base name.

Regarding your SEO question - I only know that MVC rewriting logic and 'friendliness' of the links is based on the fact that static-looking links are crawled faster then the dynamic ones. So that's something to consider on your site.( http://www.seo-consultant-services.co.uk/static-html-vs-dynamic-urls.html) I'm not an expert but I would guess that translating your url parameters makes sense if you expect users to search for services like this for example ' near ZipCode 92274' (I may be wrong)

Paweł Staniec
  • 3,151
  • 3
  • 29
  • 41