Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Currently in Umbraco, you are able to use GetCultures() on a page to get all the cultures. You'll get a dictionary of
If I were to create a multilanguage page, I would want to put links to the alternate pages in the head of the page. For this, I need the TwoLetterIsoLanguageName. Currently this is how I do it:
@if (Model.Cultures.Count > 1)
foreach (string culture in Model.Cultures.Keys)
<link rel="alternate" href="@Model.GetUrl(culture)" hreflang="@(culture.Substring(0, 2))" />
I think that the property "Culture" on PublishedCultureInfo should be replaced to a CultureInfo object. We can easily use CultureInfo.GetCultureInfo(name) to load it in. I think it makes it easier for the user to use cultures.
I wanted to post it on the forums first to check for any feedback on the idea as it's also possible for the user to use CultureInfo.GetCultureInfo instead.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted