How to write a localized route

Topics: Administration, Core, Customizing Orchard, General
Jun 29, 2013 at 3:38 AM
Edited Jun 29, 2013 at 3:39 AM
I want to write the route to let the below localized url work. I want the /en to point the English version, the /cn to point to the Chinese version.
How to implement in the Orchard? Thanks in advance.
Jun 30, 2013 at 2:47 PM
One way is to attach the LocalizationPart to your content type. Each translation is then its own content item, thus having its own slug. You could configure the AutoroutePart with a pattern such as {Content.Culture.TwoLetterName}/product/{Content.Id}, or anything you want.