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

ns8482e picture ns8482e  路  4Comments

webmedia1012 picture webmedia1012  路  4Comments

superluminalK picture superluminalK  路  4Comments

aghili371 picture aghili371  路  3Comments

mobinzk picture mobinzk  路  4Comments