Apr 29, 2014 at 8:11 AM
Edited Apr 29, 2014 at 8:12 AM
I'm working on a multilingual site. I create content for my main language and use the "add translation" button to create translated versions. While creating a translated version I can select the language of the translation. On the frontend I
can click the available translations. Everything works find in this regard.
However: The content I'm currently viewing does not seem to know its own language!
I have a very simple Language picker for my header section. It lists all available translations just fine. I want the button that shows the list of available translations to show the current language.
In the Document.cshtml there is this part:
<html lang="@WorkContext.CurrentCulture" class="static @Html.ClassForPage()">
I tried to use WorkContext.CurrentCulture but it is the same on every page! It's always be "main" language I set in the settings menu.
I this a bug or intentional?
When I go to a page that is setup to be the swedish, hungarian, german, etc. translated version of a content page, the lang attribute has to be set to the corresponding language.
How can I do that? There must be a way for a page to know what language it uses...