Hi, how do you set global user interface language for the editor/admin interface? https://docs.developers.optimizely.com/content-management-system/docs/determining-languages The documentation is giving me nothing. Am I suppose to set something in Startup.cs or in appsettings.json?
Each user can set their own language through the CMS see here for details:
Otherwise it will fallback I believe to the default configuration.
You can customise this see https://docs.developers.optimizely.com/content-management-system/docs/localizing-the-user-interface.
Checkout how to configure the fallback culture also https://world.optimizely.com/documentation/developer-guides/archive/-net-core-preview/CMS/configuration/Configuring-cms/#localizationOptions
services.Configure<LocalizationOptions>(o => o.FallbackCulture = new System.Globalization.CultureInfo("no"));
Should do the trick.
Thank you for the quick reply. I have added the line of code in Startup.cs, but it seems like the language in the interface is still in english?Maybe I'm missing something
Use this as part of your middleware in startup.cs.
var globalizationSettings= ServiceLocator.Current.GetInstance<GlobalizationSettingsOptions>();
If the user has specifically set a language in their profile then it will prioritize that over the code above.
Would this also work?
services.Configure<GlobalizationSettingsOptions>(o => o.UICultureLanguageCode = "no");