0

I have umbraco application with two language(Dutch & English). I have set the culture in every view file(.cshtml). enter image description here

After searching the google i found the piece of code to set the culture globally. but it's not working for me. I struggling in setting the culture globally. enter image description here

Arun Kumar
  • 1,449
  • 1
  • 17
  • 33
  • Instead of views, do you have a base controller or a model everything else inherits from? If so, set it there and make everything else inherit from it. Or something of the sort. Also, check this: https://stackoverflow.com/questions/8786339/programmatically-change-locale-language-of-a-page#answer-11245847 – Jabberwocky Feb 18 '19 at 10:12

1 Answers1

0

You can set the culture without having to set it in the views, you can right click on the content root and set the culture and hostnames by selecting the "culture and hostnames" option.

You must first set up the available cultures the settings section under "Languages". A default Umbraco install will be set to "English (United States)", but you can change this and add additional cultures if you wish.

Assuming you have two different domains, you can configure the relevant root nodes to respond to the correct domains and set the language as well.

If that's not what you're after, can you be a bit more specific about exactly what you're trying to achieve?

Tim
  • 4,217
  • 1
  • 15
  • 21