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
Does anyone know how can I go about setting the language via code?
Ive tried to change the values in the umbracoDomains table with no success.
What exactly do you want to do here ? You want to set the Language type or to dynamically display the language type ?
Many thanks for your quick reply.
I just want to be able to let the user set the website language via radio button.
The user doesnt want to open nodes for each language and as its an intranet website there is no need for it.
Ive also tried to send the json request to the SaveLanguageAndDomains method but keep getting 500 errors.
I guess before compiling the source code I thought I'll better ask. Im sure there is an easy way or Ive just missed something.
Am also working on an Intranet System where i have 12 different countries. What i did on mine is only allow the Admin to attribute the Country to each of his User so as to restrict certain section or any other information prior to their country.
But doing so how will you take restrict content if you a particular user doesnt have access to it ?
Im more after setting the language via the front end. None of my users (in my case member) have access to the back end.
Only memer with the Admin role ca access the setting area (also found on the front end) and change the language for the current website.
You could just update the db table directly (umbracoDomains I believe)
However you need to clear come cache after changing the table.
Ive tried changing the umbracoDomains table and clear the cache using the following with no success:
It seems as if only change in the web.config does the trick.
Hmm, don't know.
It must be possible as it works via the UI, do you have the core source code to look at?
ok so I’ve managed to solve it by sending my json to the same method found in:
Hello, when I'm trying to add a new domain on my live website I get the exception
When I create vanilla Umbraco installation it works fine. Not sure what's wrong.
Anyone facing the same issue?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted