After a long time going through lots of different forum entries and tutorials, I finally managed to piece together a little bit of Razor code to generate a multilangue dropdown. I am using a multi site structure and wanted to link relations if available in the corresponding language. The culture settings from ASP weren't formatted the way I wanted and hence I decided to create a property on my top level language folder (just below the content folder). In that property I add the language names my preferred spelling.
If a page is not yet translated in a certain language, then I still want all available languages to be diplayed. If a page cannot be accessed via a relation then the top level page should be displayed for the chosen language.
Any feedback would be much appreciated. I used Vizioz
relations to make the page relations visible in the backend.
When copying the language folders a missing feature in my opinion is that all existing relations should be analysed when copying a language folder structure. e.g. if page a is related to page b then page b is copied to create page c, then c and a should also be related, if the relation checkbox was selected.
Razor Multilanguage DropDown
After a long time going through lots of different forum entries and tutorials, I finally managed to piece together a little bit of Razor code to generate a multilangue dropdown. I am using a multi site structure and wanted to link relations if available in the corresponding language. The culture settings from ASP weren't formatted the way I wanted and hence I decided to create a property on my top level language folder (just below the content folder). In that property I add the language names my preferred spelling.
If a page is not yet translated in a certain language, then I still want all available languages to be diplayed. If a page cannot be accessed via a relation then the top level page should be displayed for the chosen language.
Here is my razor script:
Any feedback would be much appreciated. I used Vizioz relations to make the page relations visible in the backend.
When copying the language folders a missing feature in my opinion is that all existing relations should be analysed when copying a language folder structure. e.g. if page a is related to page b then page b is copied to create page c, then c and a should also be related, if the relation checkbox was selected.
is working on a reply...