This project is read-only.

Why isn't there a {Content.Culture} token for the autoroute?

Topics: Localization
Apr 21, 2014 at 5:36 PM
So I want urls with a culture code for the content item, like:
etc ....

But there doesn't appear to be a {Content.Culture} option in the autoroute. There's one for {Site.Culture}, but not one for the specific content item.

I found this stackoverflow question which pretty much tells me how to do it, so I can add it to my project. (probably without difficulty). But it feels like something that should already be there. Yet, it's occurred to me that Orchard seems pretty well put together, so it may be missing for a good reason.

Somebody else on this forum was looking for it as well, and they were told to use Vitus.Localization and if you follow that link, they say "Culture tokens cannot be used in AutoroutePart module because of an Orchard bug in the official Locatization module (as for Orchard version 1.6)."

So is there a technical reason to leave it out? Is there a large design bug making this feature a major pain in the butt? Is (Site.Culture} good enough for most use cases and {Content.Culture} has slipped to a lower priority?

Apr 21, 2014 at 5:45 PM
Edited Apr 21, 2014 at 5:46 PM
I don't see a major technical reason for this. As far as I can tell, it's just that no feature exists until someone builds and contributes it. Apparently nobody thought it was enough of a pain in the butt so far that they were willing to contribute it ;)

{Site.Culture} is completely inappropriate to the scenario however as it's not specific to the current content item.
Marked as answer by johnmacintyre on 4/21/2014 at 9:56 AM
Apr 21, 2014 at 5:55 PM
Thanks Bertrand. It's nice to know I'm not walking into a minefield.