0 votes

Culturemapper

Install the package. Add a property from type "Culture Mapper". Go to your content and create the connections between the different documents. All the cultures you set under "Culture and Hostnames" are available for creating connections.

Here's a way to render the language switch:

@foreach (var lng in CurrentPage.languages)
{
    if (lng.item.id != null)
    {
        int id = lng.item.id;
        string url = Umbraco.TypedContent(id).Url;
<a href="@url" class="@(Model.CurrentCulture.Name == lng.cultureAlias.ToString() ? "active" : "")">@lng.friendlyName</a><br />  
    }
}

Screenshots

Package owner

Pius

Pius

Pius has 20 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions:

Package Information

  • Package owner: Pius
  • Created: 09/12/2014
  • Current version 0.9.0
  • .NET version 4.0
  • License MIT
  • Downloads on Our: 467