A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
Hi,
You can retrieve the master language from the startpage, startPage.MasterLanguageBranch.
You can also change the CultureInfo on current thread in OnPreInit
protected override void OnPreInit(EventArgs e)
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("en");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
base.OnPreInit(e);
}
When I use LanguageManager.Translate(string key), it will use the current culture as the language. I don't want that, so I need to use LanguageManager.Translate(string key, string language), which also takes a language parameter like "sv".
I want to use the site's master language, but I don't know where to find the language string for that. Do you?