Hi,
I'm creating my own module for changing language for DNN portal (v 4.9.4). I want to change the language for the site without changing the URL (using rewrite URL so the language query key is not visible)
I tried almost anything to make DNN change the lang but nothing works
Localization.SetLanguage(ddlLAng.SelectedValue);
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo(ddlLAng.SelectedValue);
System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(ddlLAng.SelectedValue);
(this.Page as PageBase).PageCulture = new CultureInfo(ddlLAng.SelectedValue);
Personalization.SetProfile("Localization", "language", ddlLAng.SelectedValue);
After that i redirect on the same URL
It changes the lang i FF(just for first load of the page) but not in IE , when i navigate back to home page the language did not change.
It works fine when i have language key in the query and i change the lang like using this LocalTokenReplace.ReplaceEnvironmentTokens("[URL]");
Also tried to disable "Enable Language Parameter in URLs for Current Portal? " option for admin and host (Admin/Host - Languages)
I thing forcing the language in the URL is bad practice,
Please help is this a bug or is there some workaround.
Best Reagrds,
DotNetNuke Module Development