Orchardcore: How to render a page with culture?

Created on 24 Mar 2020  路  2Comments  路  Source: OrchardCMS/OrchardCore

Hi!
How to render a page with culture? for example:
localhost/en/index
localhost/en/page
...
localhost/ru/How
localhost/en/index
localhost/en/page
...
localhost/ru/

how to configure routing for a page render with the specified culture?

question

Most helpful comment

@niknikita

Enable the Localization feature
Then in the Localization settings, add the languages you want to support
Add the Localization part to the types you want to be localizable
In the AutoroutePart of the type, use something like {{ ContentItem.Content.LocalizationPart.Culture }}/{{ ContentItem | display_text | slugify }}

Then create content items and localize them. Their routes will have the culture in the prefix.

All 2 comments

For more details about localization & routing please follow the this

@niknikita

Enable the Localization feature
Then in the Localization settings, add the languages you want to support
Add the Localization part to the types you want to be localizable
In the AutoroutePart of the type, use something like {{ ContentItem.Content.LocalizationPart.Culture }}/{{ ContentItem | display_text | slugify }}

Then create content items and localize them. Their routes will have the culture in the prefix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hishamco picture hishamco  路  3Comments

jardg picture jardg  路  3Comments

cbadger360 picture cbadger360  路  4Comments

ns8482e picture ns8482e  路  4Comments

deanmarcussen picture deanmarcussen  路  3Comments