This is also something I am interested in. I want to have my admin in English but when I switch to the site I want to be able to switch to one of site languages and keep admin in English. If there is nothing like that can somebody create a plugin? Or what to consider when writing it?
Easy. Take the english language pack, translate everything except "Admin." strings to spanish and import such language pack as spanish language. The administration stays in English even if spanish is selected.
That is possible and was thinking about it. Only problem is I would need to do it with all my languages available in store and all registered admins would have only English options. What if I have admins in different countries? I think there should be an option to switch admin language.
I found out that there are already properties AdminAreaSettings.UseEnglishInAdminArea and LocalizationSettings.DefaultAdminLanguageId but they are not in use. Could somebody create a plugin which would utilize them?
This is also something I am interested in. I want to have my admin in English but when I switch to the site I want to be able to switch to one of site languages and keep admin in English. If there is nothing like that can somebody create a plugin? Or what to consider when writing it?
Hi. if you want to make admin area language fixed then my simple solution is to set language on _AdminLayout.cshtml file.
//admin area var workContext = EngineContext.Current.Resolve<IWorkContext>(); var languageService = EngineContext.Current.Resolve<ILanguageService>(); var adminAreaLanguageId = 1;
if (adminAreaLanguageId > 0) { var language = languageService.GetLanguageById(adminAreaLanguageId); if (language != null) workContext.WorkingLanguage = language; }
BTW this code work for ASP.Net versions(3.90 and older), you most update the code for .NetCore versions
Hava a nice day.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.